When Middle Earth's spacetime was being woven, Ungoliant showed up. No one made Ungoliant. No one knows how it showed up. It's like saying 'God said "Let there be Light." And there was Light. And something saw the Light. And hungered.'
I sort of thought that was the entire point. He revels in the ridiculousness of it. It balances out what would otherwise be the unassailable weight of his purpose.