I’d have guessed that non user-replaceable batteries were motivated by reduced manufacturing cost, enhanced reliability, and competitive market forces for lightest/thinnest phones.
A removable battery means a battery ‘door’ and compartment, which would add to costs of plastics & mouldings.
It also encurages people to do as has been suggested earlier in thread, and swap in/out spare batteries on a regular basis, to extend time between charges. This means the connectors must be robust enough for maybe several hundreds or even thousands of operations, instead of just once or twice at manufacture, or professional repair. More robust connectors will add to cost. Same effect means the battery door must be designed to withstand multiple open/close sequences, further emphasising point of previous paragraph. And no matter how well designed, accidental damage to doors or terminals is a risk each time the battery is removed/replaced.
Lastly, the bulk of additional mouldings for battery door, and of the more robust connectors to sustain frequent operations, may not seem like a lot but will be at odds with the manufacturer’s competitive goal of weight saving and space saving.
...just guessing though.