The only reason apple even charges significantly more for the higher RAM models is because its price discrimination to upper end consumers. It doesn't cost apple much more to increase ram size from say 128 gb or 256gb to 512 gb or 1024 gb, they just do it because they know the higher class consumers will pay it.
From what I remember reading, its like maybe $20 for them to double the ram size, and yet they'll charge $150-$250 more for the higher ram model.