Compiling new Android systems requires 16 gigabytes of RAM at compile time. Trying to compile it with 6 gigabytes will end up swapping so much that the system becomes unusable. I have 12 gigabytes and it's a bit slow and painful.
I have no idea why it takes so much memory and I consider it to be somewhat a problem. However, it's not a problem I can do anything about but I still have to live with it daily and get my job done.
Linux has excellent caching for I/O operations, so having more memory makes things faster, so even if something does not explicitly need the RAM, having it there will make thing s go faster.
Sure that having more RAM won't make things slower. But for most uses cases SSD compensates for lack of RAM, as swapping becomes reasonably fast.
You need to swap our more than 200 MB per second to saturate SSD in MacBook Air, it is hard to produce that much of non-garbage data.
Forget compiling; if (for example) you want to have a couple of meaty java projects open in an IDE plus an appserver plus a db tool you're way over 4Gb before doing any work. And then if you want to run the database as well, or say virtualbox, or use a browser...
Plus RAM is ridiculously cheap; I've just seen 24Gb for £100 plus VAT.
Swapping is far more efficient on SSD and so RAM isn't such a problem. At least it works good enough in cases when you have a lot of data in heap which isn't used frequently (your example of multiple projects open).
RAM is cheap, but it still would take additional volume inside of laptop + use more power.
For most cases when people claim they need more RAM the actual bottleneck is I/O rate which is kinda improved by having RAM to use as cache, but SSD usually works out even better.