"Premature optimisation is the root of all evil" seems, surprisingly, to be a sazen. I believe there's a chance that wanting to optimise everything is one way people learn the area they're going to be working in. After this, they might burn out. But then, if and when they come back a second time, they remember from experience that "premature optimisation gets one nowhere", and actually begin solving the problem. The once prematurely optimised problems become boring to them, so they "just" solve them in a boring and completely adequate way. But they can only prevent themselves from expending effort in optimising problems because they know a. how to solve them optimally, and b. how much it even matters if that problem is solved inadequately.
If you think about the reality where no such premature optimisation occurs, it's typical to feel like you're slashing in the dark. "is this the right way to do this? Dear God I hope so!" is how it feels. Eventually when you come across a nugget of vital information, it feels like "wow, I wish I had done some background study first, so I could have been doing this properly the whole time". When one lacks knowledge about their subject, and what a typical best answer looks like, I feel like they probably can't come up with "boring" solution to things. They can probably only come up with solutions that feel like "Did I care about this enough? Is this going to be a problem eventually? This seems botched."
So yeah, you only get to say "premature optimisation is the root of all evil" if you know what wasted premature optimisation feels like, is what I think.
This seems to be people trying to maximize rather than thinking about the area under the curve.
For the gym example, what actually matters is "muscles gained" (or weight loss, or your 1-rep max bench, or whatever), but instead people try to maximize "muscles gained" / gym session.
It may be the case that your code efficiency improvements may have been critical for the program to be fast enough to reasonably use; that your calendar search may have led you to the only calendar app that works for you; that your self-help book binge continued until one book hit home, convincing you to start actually changing instead of merely fantasizing about it; that after you trudged to the gym a few times, your Ultimate Gym Routine was so effective that the changes you expected to see after months happened in weeks, motivating you to keep working out; or that your ten-day cyclical amalgamated diet was just barely enjoyable enough to stick to long-term, and anything less optimized would've been a failure from the get-go.
The "critical 3%" do exist, but I wouldn't bet on them from the start.