Yea I don't doubt that capitalist greed goes into it too.
And in the case of true fear of liability lawsuits, even that also has capitalist greed undertones:
Imagine you're building random-iot-device-with-a-lithium-battery. You could:
1. Build the whole thing so it's easily hackable
Your lawyers point out prior art in liability cases around exploding/burning lithium-powered-devices and won't really approve release without some precautionary measures
2. Properly isolate and test the battery and related systems, ensure they can't possibly overheat even in the face of arbitrary input from the rest of the system, if modified. Lock down the battery parts, leave everything else open.
3. Do some testing on the whole-ass system to assuage your lawyers, and then lock the whole thing down
3 is typically cheaper, a lot of companies then open door 3 instead of 2.
Capitalism and liability lawsuits tag teaming here imo
Side note, the reason we have a litigious society imo is because most companies reach for door #4
4. Yolo, release unsafe product even with company's own firmware, fires and explosions ensue, people are maimed and die, lawsuits follow. Because lawsuits are the only recourse, we don't hold the companies criminally liable or anything.
You don't have to actually do #3. What most companies do is just get a UL certification (to reassure consumers) and put the label "no user-serviceable parts inside" on the case (to meet UL mandates for safety)
That's more than enough to avoid civil liability for user stupidity
Locking shit down is something you do for other reasons entirely