I don’t know.
I don’t presume to know what God thinks. I just know that he laid down certain laws, and I can usually witness their veracity in everyday life. And I don’t think he steps outside of them whimsically, circumstantially, or arbitrarily.
I just do my best to follow His logical Law as my understanding allows.
You can see the pattern of how God deals with nations in the OT when Israel sinned.
God did not bring judgment on them just to punish them but to bring them to repentance. He addresses something similar in Revelation 2 & 3, where He calls on the churches to repent lest he remove them.
We can know how God thinks by reading His word. He’d rather show mercy than bring judgment. So “punishment” is not just for the sake of punishing, but allowing these things to occur is to bring us to repentance.
And if you still can’t figure it out, you need to get into the Word more. It’s clear in there.