God tests people so that He will know how we Trust him and how we obey Him and follow His commandments.
But we as human beings are full of curiosity that leads us to temptation and causes as to become sinners.
We are not content with what God has given to us. We seek or ask for more.
To pass the test of God is to repent our sins and to Trust Him wholeheartedly.