Once evil (sin) entered into God’s creation God had to deal with it. If He let evil run amuck it would ruin His creation. If he destroyed it in an act of raw power in would violate free will and be tyrannical. If he forcibly removed the evil from infected beings it would violate both free will and justice.
So God executed the plan that would stratify both free will and justice while not being tyrannical. The second person of the trinity (Jesus) would come to Earth as a man and die to pay the penalty for our sin such that all who accepted God’s gift of redemption could save from their sin and go to heaven to be with him.
Since God can allow any evil into heaven since it would be ruin heaven, God could remove the evil from the redeemed before they enter in to heaven because they had chosen to be with him and have it removed.
However those that rejected God’s offer of redemption were saying that they did not want to be with God and so God will one day give them what they want to be sent to a place with out God. This place called Hell is the worst place imaginable, with eternal burning. However it is not God’s fault if in giving those who reject salvation what the want if it is not what they expect.