Pre-optimization became a thing because enthusiasts liked the challenge of creating an elegant solution, but I posit that it continued because devs knew they were not going to be getting back to fixing inefficient code if it mostly worked. Usually stuff like this doesn’t matter when you’re leaking 5mb an hour on a 128gb dedicated server and you’re deploying at least twice per week. But when the devices that connect to you go from 10,000 to 1,000,000, you’re leaking 500mb an hour and then you have a problem very quickly.