All eukaryotic species came from a common ancestor.
Millions of years ago, there were a meteorites fall that almost kills all living organisms on Earth, only a few survive and those evolve into all species as we know them now.
And this is why into DNA code, you can find similar parts or sequences of genes in a lot of different species.