So writing optimized software was niche and overshadowed by the huge gains of hardware. People and corporations didn't care. They preferred fast feature delivery. Even when optimizing techniques like multi-tenant servers, we ended up having heavy containers wasting RAM and resources. And most apps switched to web frameworks like Electron where each one has its own huge web browser. Most people didn't care.
I hope this shortage has a silver lining of untangling the mess and refactoring the sea of bloat. But I know it's more likely some trick will be found to just patch it up a bit and only reduce the pain up to the new equilibrium level. For example something idiotic like Electron sharing resources across multiple apps and taking huge security risks. Corporations love to play false dichotomies to save pennies.