Now for your answer:
According to a girl in Solaceon Town, where one of many Pokémon Day
Cares are located, no one has ever seen a Pokémon lay an Egg, and so
it is not confirmed that this is how they appear. No alternate
explanation for their creation is offered, however, and most assume
that the details are not gone into to keep the games appropriate for
all audiences.
-Bulbapedia.