That's like asking, how was God created? lol
But arceus is much like God. I mean religious people argue (iirc) that there could not randomly have been a universe, but the same thing goes for God himself. Like how could there randomly have been a God?
How could there randomly have been a pokemon? But that's a different discussion...
I just think that Arceus stands above all pokemon (even though I think Arceus is incredibly lame) and Mew was the first pokemon he created. Therefore Mew is the ancestor of all pokemon.