It happens when there’s no meaningful competition, and when the friction of switching to a competing product is too high. Companies want to make more money with less. If you can get away with doing less without losing a significant amount of customers, then you will do it.
For example, the problem with switching social media is that you have to rebuild all your connections. They can make it worse, because customers aren’t willing to switch.
Another example is Windows. If you’re dependent on a program that only works on Windows it’s hard to make to jump to Linux.