Purchasing ram for a single machine is cheap. But if you've got a million machines, then investing another $100 in each of them, still costs you one hundred million dollars.
Which means it's worth it to spend a lot of programming-hours, even for just a modest decrease in this. A single percentage reduction in memory-consumption, is worth a million dollars.
Lots of stuff is worth it at large scale, even if at small scale it doesn't matter. If you're a small company owning a dozen servers, then in 99% of the cases it'll be cheaper to just throw more ram at them, than to spend programmer-time reducing the memory-footprint of the applications.
If you've got a million servers, the math looks different.