I'm an all-season rider who lives in a city that loves salt. Most of the drive train on my older road bike (plus cables, cable housings, and the rear wheel) has been replaced piece by piece for considerably less than your modern SRAM derailleur. Parts are readily available and most modern bikes use the same components. Sure there are modern bikes where replacement parts are considerably more expensive, but they're easy to ignore unless you are in the market for something specific. Then again, the same thing could have been said about bikes 10, 20, or 30 years ago. This strikes me as being in sharp contrast to most electronic devices and many electric appliances, where finding something repairable is the exception and it may not even be possible if the given component is specific to a given model or manufacturer.
I think the balance is just opposite in electronic devices.
As you mention, you can assemble a bike with all parts at roughly the same costs without that much of a trade-off. The example I was giving is more of the exception of putting a very performant/specific core part into a meh setup.
As I see it, in electronic devices it’s more common to have a very basic structure with super cheap commodity components, except that one corepiece that pushes the whole appliance’s capabilities far ahead. For my washing machine, the metal frame, belts and motors are cheap run of the mill parts that might not have changed for decades, and only the controller is custom designed to adapt to modern use. Or looking at rice cookers, a tremendous portion of the value would go into the pan and the controller, and the rest of the housing and heating structure is pure commodity. As a caveat, that might not be the case for high end appliances, where perhaps every component could be high quality, but I’m too cheap to confirm that.