Engineers have become experts in selecting components so that they fail right after the warranty period.
Replaceable batteries just means they will make something else weaker instead, preferably something that fries the device once it fails (see https://youtu.be/7cNg_ifibCQ?t=238).
It's too dangerous not to, as nowadays phones (or computers in general) don't really need to be upgraded that often to remain useful. No manufacturer wants a repeat of the 1080Ti.