Because if God only allowed us to be good, we would not be able to act freely and pesonally accept God out of our own will. If everyone was good, and no one was bad, then everybody by default would accept God, thus free will would not exist.
You don't have to, and that's the whole point. God...