Thing is that Melkor and the other spirits were essentially children, and Illuvatar was letting them play with a gun without telling them it was real.

The song was of supreme significance to the future lives and wellbeing of every mortal creation and those among the Ainur who chose to move to the world. Every discordant note added by Morgoth and those who joined him was the addition of war, murder, sickness and other such unpleasantness that would affect the lives of the Ainur and of beings who didn't even exist yet, and Eru didn't stop them after the first time and actually tell them that. He just adjusted his song to incorporate the evil and kept going. He didn't try to stop the evil that was being added to his creation, he just used it as a springboard to create the next step of bittersweet goodness.

How many men lived and died in misery? How many orcs, elves and dwarves? What of the dragons and trolls and wargs who lived lives of cruelty and suffering and pain. Would Melkor have knowingly condemned them to such at the dawn of time if he had known? I don't know, but I do know that Illuvatar allowed their suffering to be conceived by his ignorant and impetuous children, and then used it as part of his creation even though it was cruel.


It does fundamentally come down to the real world 'Problem of Evil,' a philosophical question that a lot of real world religions struggle to answer, and one I think Tolkien struggled with himself both in his fictional works and in his real life from time to time.