Evolution. It was the luck of the draw. Most animals don't do it. Why do women have periods when most animals don't?
Dude, seriously. Some things are just so simple you can easily Google for your answer faster than you can create a post here.