Once Moses led the Israelites from Egypt is a good place to start. Deuteronomy is filled with laws and instructions on how to treat those who transgress the law.
The laws in Deuteronomy was given to Israelites after 40 years of the desert without having learned anything.
On Sinai, God gave them a Law for holiness. With this law, they were to go to Canaan in holiness and convert people there by their holiness.
However from the Golden Calf incident on, they kept falling that by 40 years, they had not changed. In fact, they had just fallen into a second greatest sin (Numbers 25). They had learned that it is very hard to be holy according to God’s standard, but they had not asked him to give them power to be holy. This is what Moses told them 40 years after giving them the Deuteronomical laws:
Deuteronomy 29:
[1] These are the words of the covenant which the Lord commanded Moses to make with the children of Israel in the land of Moab: beside that covenant which he made with them in Horeb. [2] And Moses called all Israel, and said to them: You have seen all the things that the Lord did before you in the land of Egypt to Pharao, and to all his servants, and to his whole land. [3] The great temptations, which thy eyes have seen, those mighty signs and wonders, [4] And the Lord hath not given you a heart to understand, and eyes to see, and ears that may hear, unto this present day. [5] He hath brought you forty years through the desert: your garments are not worn out, neither are the shoes of your feet consumed with age.
Here, Moses is telling them that since they keep falling and are not asking God for help, God has commanded him to find a way to deal with them. 40 years have passed and they are about to cross the Jordan to enter the land. Yet, they are not ready. They are more prone to adopt pagan practices (Numbers 25) than the pagans are to adopt their holiness. So Moses (not God) made the Deuteronomy covenant with them at God’s request. Here, because of their wickedness, Moses tolerated a numbers of evils but told them that unless they repent, the curses (Deut. 28) which he pointed out will befall them (Deut. 30). He also prophesied that they will suffer greatly through their sins and learn through their suffering that they can’t achieve anything by themselves. Then they will ask God his grace to transform their hearts so that their eyes would see , and ear would hear.
Deut. 30: [1] Now when all these things shall become upon thee, the blessing or the curse, which I have set forth before thee, and thou shalt be **touched with repentance of thy heart **among all the nations, into which the Lord thy God shall have scattered thee, [2] And shalt return to him, and obey his commandments, as I command thee this day, thou and thy children, with all thy heart, and with all thy soul: [3] The Lord thy God will bring back again thy captivity, and will have mercy on thee, and gather thee again out of all the nations, into which he scattered thee before. [4] If thou be driven as far as the poles of heaven, the Lord thy God will fetch thee back from thence, [5] And will take thee to himself, and bring thee into the land which thy fathers possessed, and thou shalt possess it: and blessing thee, he will make thee more numerous than were thy fathers.
[6] The Lord thy God will circumcise thy heart, and the heart of thy seed: that then mayst love the Lord thy God with all thy heart and with all thy soul, that thou mayst live. [7] And he will turn all these curses upon thy enemies, and upon them that hate and persecute thee.
Now, all these things happened. Through Joshua, David, Salomon, etc up to John the Baptist (who gave them a baptism of repentance) all this things happened. They struggled with enemies, built a Temple and got it destroyed, they went to exile several times and got scattered into the nations. Then they cried to the Lord and the Lord sent them Jesus.
Those who received Jesus, God did to their hearts what he promised. Through Jesus, God gives us the Holy Spirit. And by the power of the Holy Spirit, hope and faith are restored in their glories and splendor. People of God are made capable to abolish things like death penalties or Genocide survivals to forgive those who harmed their families. This is not weakness it is divine power. It is not anyone who can love their enemy.
When we distance ourselves from God, God leave us alone so that we may prove ourselves. When we refuse his laws, he leave us to make our own laws until we are convinced of their deficiency… So yes, it is still justice when we are left to ourselves.
It is God’s justice when an addict prosper in their addiction. But this is not a blessing but a curse. God’s law has blessing for those who obey it, and curses for those who disobey. both streams from his loving kindness. When the addict hit bottom, he wakes up and thank God. But God does not wishes us to go through all this in order to get it.