Joel, chapters 1-3

“Also, what do you have against me, […]
Are you repaying me for something?
If you are repaying me,
I will swiftly, speedily bring your repayment on your heads.”
~Joel 3:4

It would be a mistake to try to judge God by our own imperfect standards when he is the ultimate judge of what is and is not righteous. (Is. 55:9)
Even when we do not understand why God lets us tolerate a painful situation, the wise course is to demonstrate patience and faith that God still does care for us and will eventually make all right. (1 Pet. 5:7; Rev. 21:5)
It would be shortsighted of us to draw away from God to follow a selfish course of sin, perhaps without ever repenting and eventually incurring his wrath.
On the other hand, if we remember he is not responsible for our suffering, we can rely on his strength to help us endure. (Job 34:10; Ps. 55:22)