MeAm Lo'ez

42:23  So if you ask, "Why did G-d do this?"  You must be ready to listen to the answer:  Pay attention to all the great things which G-d did for you in the past, things He did for no other nation.  Then you will know that the suffering which He gives you is the fruit of your own sinful deeds.  Listen now to the rebukes which He sent you in the past, so that at least from now on you will not be punished.