Natural selection had a say in female mammals leaking blood trails every month, which is, mildly said, fcking stupid. Natural selection does not create optimal beings, it creates stuff that, somehow, kinda, works.
If you have the time for it, I highly recommend the lecture series on behavioral evolution by Robert Sapolsky, it's on the Stanford YouTube channel.