Isaiah 45: The Nature of Prophecy

Sometimes, in scripture, it seems as though God responds with compassion and answers to questions. Other times, it seems God responds with a rebuke. Why?