God wanted them to come out of sin and hiding and shame and come back into relationship with Him. But God is just and righteous, and He could not tolerate sin with no consequence. Sin required payment, and the price was death.
*That* silly story again…