Well… it isn’t. At all, actually. That’s a weird falsehood that people like to spread – that Apple’s literally using the exact same machine Compaq/HP sells, putting their logo on it, and doubling the price.
Different components, different hardware, different software, and nowhere near as expensive as people pretend they are.