It is very easy to write code that “works on my machine” or “works in QA” and then fails when it hits production volumes or a requirement changes to add more users/elements.
Then it often becomes prohibitively expensive to just throw more servers/VMs at it.
And often the “expensive” engineer changing a nested loop into a map lookup can save years of compute time in a matter of hours.
Unfortunately all too often that only happens after scaling up/out without understanding why systems are slow.
Don’t get me wrong, I’m not arguing for needless early optimisation but an inefficient query/algorithm can waste a lot of computing resources...