Neither can the Lord be stated to be handing out favours, nor can He be said to be cruel when He punishes, unlike one's relatives and friends or enemies. He is the only real neutral entity, everyone else has some motive. Ishvara is presented by the shAstra as a karmaphaladAta, meaning that He hands over the results in keeping with action as and when the karma is ripe to yield results. The connection as to which action gave which result is unclear to human beings since it may take across lives for the the circumstances to be perfect to manifest the result of any action. Some actions show immediate results, which also are assumed to be of the some perceivable action, but may not be so. With this background, we know that we get the result, for good or bad, based on our own actions. The Lord just gives us what we earn, without adding or subtracting anything from His side.
- If He did, the performer of ill-action will likely consider the wrong action to be the norm and continue doing so. This is disastrous to the person spiritually as well as for the society at large, since people may follow the same. There will be no social-order.
- With the law of karma, if one is punished as per wrongdoings, he is freed of such wrong doing and will not have to wait to have all pApa to add up and result in a life that no one should get. Such life can be full of pain and not worth living even for a moment. So in one way, Ishvara's punishment can be seen as a blessing, not cruelty at all. This is the same reason that Manu smriti also recommends a proper punishment in this life itself, so that the future life is not ruined for the jIva. The punishment and suffering in this very life can cleanse the person of future suffering in hell, or animal bodies, etc!
- Once a person learns that every wrong action brings pain through punishment, one will refrain to the best of his ability, since no one wants pain. This will lead the person to good action and thereby, spiritual growth towards the goal of all-life, moksha.
ॐ तत् सत्।