Optimization was never the goal. It just has to function well enough for a sufficient portion of the species to reproduce.
Evolution is an optimisation process, just a very slow, wasteful and stupid one. It finds local optima which it usually gets stuck in.
evolution is the epitome of “good enough, ship it!”