Optimization was never the goal. It just has to function well enough for a sufficient portion of the species to reproduce.
Literally the evolutionary equivalent of “eh, good enough”