When He created them, God very lovingly gave freedom of will to the angels and to mankind. In many ways, it looked like such a kindness had backfired on Him as man fell into sin by choosing to disobey God. Yet, freedom of will ultimately gives man the ability to choose a life that glorifies God in this life and for all of eternity. 

jeremiah 29 11 2