"O God, the proud are risen against me, and the assemblies of violent men have sought after my soul; and have not set thee before them. But thou, O Lord, art a God full of compassion, and gracious, long suffering, and plenteous in mercy and truth". Psalm 86:14,15
He learned that while men were violent, uncaring and destructive, God was a good God who was full of compassion and mercy. He learned that God would not treat him in such a way. He knew he could always count on God to treat him fairly, even when he would fall or fail.
I am thankful that God is not like man. You don't have to wonder or worry about Him. When people hate me, I know He still loves me. When all forsake me, I know that He is still with me. When there are those who try to do me harm, I know that He will only do good to me. When there are those who are against me, I know He is for me.
So many people become "anti-God" because they equate Him to people. They equate Him to an abusive father, to an unfaithful spouse, to a violent person they know, to the Christian who is a hypocrite, and so on. But He is NOT at all like us. He is not at all like any person we would dare to compare Him to-- good or bad. He is God-- not man. He is the Creator-- not the creation. He is love-- not emotions running wild.
Have you defined Him, acquainted Him with or looked at Him like you do some person? Then you are seeing Him incorrectly. He is in a "class" all by Himself.
Have a great day. You can't compare God to men and get a true picture of who He is.