I thought the real reason manufacturers do this is because they're in a very low margin industry. For computers they get some deal with software companies to pre-install their product, and similar for cell phones with service providers.
With that said, differentiating by custom UIs on top of the base platform (i.e. the Android approach) would be much better, and would be actually-useful differentiation rather than a matter of "well which company's going to fuck me over the least with their preinstalled shitware?".
This also isn't exactly universally true. HTC was pretty responsive in getting Lollipop out to my One M8, for example, even with its whole "Sense UI" shebang.
It's still only one sort of business strategy. Not every hardware company is necessarily pursuing this line.
Does that not void the warranty?
When the customer is not a consumer but a company, then things might be different (companies may be able to give away their rights in a way that consumers may not).
In EU countries, a manufacturer may offer a warranty, but this is just supposed to be an extra service; the seller is at least required to provide defect liability (i.e. a device must fixed if broken when it is sold and it must last for a reasonable time in reasonable use).
So I don't think changing a hard drive would void it. But also, I don't usually care about warranties. Things usually break only after the warranty expires, and for any electronic device, as long as it's a common enough model number it's usually possible to get spare parts on eBay when the time comes.
Also, Thinkpads all have a BIOS whitelist that prevents you from actually using the hardware you just easily installed.
For example, If your HDD fails under warranty, they'll ship you a new one with the simple instructions to replace it. Only tool needed is a small Philips screwdriver. :-)
Microsoft, Google, Apple, Ubuntu, et al. all make decent OSes that are designed to, um, work. I don't get why manufacturers don't get this simple fact and always have to tamper with stuff. For the less-technical people out there, can't we have a "Nexus" sort of PC manufacturer who prides themselves in selling with ONLY vanilla OSes and as-standard-as-possible hardware components?