Material quality: Purple, which I roughly used as inspiration for my original mattress design, used polyurethane which is cheaper and lighter, but less durable, than the latex I used for the core of my mattress. I have no idea what they used now but that was the case at the time.
Economies of scale: They can keep making the same few shapes cheaper. I was unable to buy specific dimensions of buckling column gel so I had to buy several toppers to extract the material and I only used 49 square feet out of the 64 square feet (although I found other uses for some of the remaining gel), plus the toppers came with other cheap foam that I had little use for. It's really difficult to order buckling column gel directly.
The literal scale: My mattress is larger than most of the US mattress companies, more material = more money. I imagine an emperor sized mattress would be similarly or more expensive from Purple. I would've gotten slightly better ROI per size had I made my bed larger due to the aforementioned discarded buckling column gel. Plus I needed to get nonstandard custom sheets and a custom sized encasement.
A good quality mattress, where you spend 5-8 hours every day - is one of the areas where skimping is not worth while in my opinion. Same with computer chairs, or any other thing that impacts back and joint health over prolonged periods.