No, natural selection does not select for perfection. It selects for functionality, which is a little bit different.
IMO, perfection in a dynamic (unbalanced) system is impossible. It’s what keeps the universe striving for “movement in the direction of greatest satisfaction.”
Perfection is “stasis”, or “in perfect balance”, which IMO, existed prior to the BB until “a symmetry breaking event” tore the whole thing apart into a state of utter chaos.
Only when the whole was disturbed, did the mathematical values and functions become individually causal to individual dynamic behaviors.
Perhaps can be compared to a perfectly still lake and an avalanche plunges down a mountain into the tranquility, creating chaotic wave interferences, which eventually tend to mathematically resettle into a temporary stillness (perfection) until disturbed again…?
Second Law of Thermodynamics?