The initial R&D done into cars, is calculated along with the car parts. Lets just say selling a car won't yield a car maker profit, but it's within the parts and it's designed life cycle.
I had a 2001 RS4 B5 Avant with approx 500HP worth of madness. One day the brakes where due - ordering the original B4 RS4 Avant ones costed (!) 4600 EU without any labor. I'm asking the dealer why is this price so explosively high compared to, Brembo or any other brand? They explained (honest) that during the R&D and lifecycle of the car, prices are inflated exactly because of that. I thanked them and ordered my parts online.
Difference was 1800 EU including labor vs 4600 EU without any labor done. And they where even better, perforated front and back discs + pad that held up PERFECTLY fine even on track.
Another example: We needed a gearbox sensor for the exact same car. Now there is obviously one with a RS4 badge on it and one with a S badge. The S badge costed less then 80 EU, the one with RS4 badge more then 180 EU. The difference? They where identical.