God created man, then realized He made a mistake, so He made dog.
That is the most plausible explanation of the creation theory.