Apple get their profit margin by selling many many machines of exactly the same spec. Deviating from this spec means they need to build a different machine, ship it individually, etc - they can't just dispatch one from the local store.
This costs them money. To maintain their margin, they charge more for it.
Don't like it? Put ram in yourself.