The Israelites were led out of Egypt by a God who loved them. He showed them incredible miracles including parting the Red Sea and raining manna down from Heaven. Yet, they continued to lack faith in Him and “grumbled” against Him. The fact that they were not destroyed is proof of His mercy and loving kindness.
As it says in Exodus 34:6, He is “merciful and gracious, longsuffering, and abundant in goodness and truth, keeping mercy for thousands, forgiving iniquity and transgression and sin”. However, those who did not repent needed to be held accountable as the verse continues, “that will no means clear the guilty”.
God loves His children and wants the absolute best for us. His guidance is the only way to attain that. Sometimes His guidance is difficult, though. If we repent from our sins and turn to Him, He will always forgive us and love us because that is who He is – righteous and full of grace, neither of which we deserve!