It really depends on how a manufacturer does it but in some cases, it's cheaper to install the part and just deactivate it if the user doesn't purchase it instead of tooling two different lines in the factory
The most vaunted feature of teslas, "Full-Self-Driving" (note, not actually full self driving) is also a clear example of this.
It's $10k, and it's a 100% software update for all modern teslas. The FSD stuff, as I understand it, is all on-car (i.e. no remote tesla-run service involved), so you really are just paying to unlock use of hardware already there.
It's not immoral to charge for software. There's a difference between charging money to add a toggle button for already existing heated seats on the touchscreen vs. charging money to license the most advanced driver assist software available to the public, still under development.
Introducing scarcity dynamics where none exist, is to me, one of the most immoral of willful actions to undertake.
Now, a situation where I agree with the core thesis of "to introduce scarcity dynamics where none exist" is around, say, virtual real estate, or the most obvious one of them all: NFTs.
And yeah, the calculus here was to outfit every vehicle with the hardware, whether purchased or not, because the cost of the hardware is made up for not merely in potential future conversions/purchases, but in the ability to collect reams of data from a fleet of vehicles constantly annotating and sending back information to their model.
To wit, the FSD stuff is indeed all on-car, but the FSD-as-a-work-in-progress-constantly-evolving requires significant tesla-run services: they ML work is being done centrally, and then updated models are pushed down to the cars to, hopefully not run down innocent pedestrians in the street.