If you're coding for someone else, rather than coding for yourself, why is this a trap?
It might be satisfying to deliver a hyper-optimized end product, using optimal algorithms everywhere, with everything tuned so that it delivers the maximum performance with the minimum resource usage. But is that what your customer is paying for? Or are they paying for a website that works well, and is operational at the end of the month?
Not everything has to be a work of high art. Pop art is fine too.