Serious question about the cost of a top bike.

What's the explanation behind how bikes got more expensive than motorcycles? And some good used cars. Is something in the engineering, material, time to produce?

OR, pure marketing and fans of the sport thay will pay whatever it costs to have "the one".

Asking because an S-Works Stumpjumper 15 LTD costs around 15K. Took a look of a top road bike and similarly around the 12K. 3K for a bike is already too much for a bicycle that is mass produced. But I want to understand, please help me.