Of course Nature has no direction or purpose. Minor variations are always popping up (I repeat, "minor". Nothing like the X-men.) and desirable characteristics have, statistically, a better chance of surviving and being passed on.
Given enough time, changes accumulate. Things could have gone other ways; ways we'd see as grotesque, but which parents of those monsters would find "cute" and worth protecting.
To use your example, there are occasional mutants with little or no interest in sex. That's an evolutionary dead end. All that ever matters is DOES IT WORK? It's besides the point that other things might have worked as well or better. Certainly our anatomy has plenty of flaws but Nature never does a "complete re-design". It can only modify existing structures. For example, the 3 little bones which amplify hearing used to be part of the jaw. They were re-purposed.