Spoiler: On Illuvatar
Show
illuvatar's own words state that he knows full well what Melkor's actions will bring about, and that they are indeed part of his own plan to make the world.

Then Ilúvatar spoke, and he said: 'Mighty are the Ainur, and mightiest among them is Melkor; but that he may know, and all the Ainur, that I am Ilúvatar, those things that ye have sung, I will show them forth, that ye may see what ye have done. And thou, Melkor, shalt see that no theme may be played that hath not its uttermost source in me, nor can any alter the music in my despite. For he that attempteth this shall prove but mine instrument in the devising of things more wonderful, which he himself hath not imagined.'
He's outright stating that he incorporates Melkor's misdeeds and evil because it was part of his plan all along, hell he basically says he's the source of evil itself. It even implies Melkor was made specifically for the purpose of being the traitor that introduces evil into the work, so it would make a better creation by Illuvatar's standards.

Which would be sketchy enough if Melkor was a knowing actor playing a part that he had been told to, because it would mean Illuvatar prefers a story with people dying and suffering horribly over one where everyone is happy and enlightened. As is he comes across more like a robot that can feel pain, designed to fulfil a specific role in Illuvatar's real design without being aware of it, and suffering for almost his entire time on Arda, which isn't even fair to Melkor, let alone his own victims.