Why did God give them free will? Because free will, though it makes evil possible, is also the only thing that makes possible any love or goodness or joy worth having.