Apple doesn't optimize for benchmarks. Apple optimizes for performance, and benchmarks measure such performance.
Given a set of benchmarks, you will see a natural variation in the results, independent of RAM or any physical attributes.
That said, more RAM will massively improve performance, for a number of reasons. One is that a lot of RAM is used for cached files, which Apple tends to keep no matter what. Once the system starts to swap, your performance goes down considerably.
Another is that RAM is also used for VRAM, and it is not dedicated. Swapping and compressing will therefore also affect graphics performance.
I maxed out RAM for this very reason, knowing from many years of underwhelming experience of too little RAM and sub-par memory handling on Apple's side.
Today, 16 GB is the bare minimum to just breathe comfortably.