Best case scenario is that they had already secured a RAM deal when the prices went mad, so they can now offer a good price. Even then, it might still be an issue for later batches though.
I’m pretty sure they likely did what they did with the steam LCD, which was order an absolutely insane amount of units that they had stock for years. The semi-custom AMD chip they’re using likely needed a minimum order of millions of units.