But this is the market failure.
If you ask a normal person why they should care about having a phone with drivers in the mainline kernel tree, they don't even know what you're asking. But the answer is, because then it can keep running the latest version of stock Android indefinitely, instead of being forced to buy a new phone over and over.
At which point a 20% difference in the hardware price will be relevant, because if you want to keep the phone a long time you'll want the one with 16GB of RAM instead of 4GB -- which is fine because RAM is under $1/GB.
But since the average phone customer doesn't know this, the phone they want isn't even available and their choices are the cheap phone which will be out of support in less than a year or the one that costs four times as much up front and will still be out of support before they otherwise actually need a new phone.