Our professor of the Software Engineering Group Project course told us that a software product should try to keep users in the application for as long as possible, and try to avoid directing users away from the platform we control.
From a "commercial" point of view, this is, to some extent, correct, but this model is really extremely broken. The current ecosystem of the Internet has proven how bad an idea it is for everyone to keep users exclusively on one platform. No application should even make the attempt to draw users' attention unless necessary for the functionality, and they should be kept as simple as possible -- a search engine shouldn't be an advertisement site, an IM shouldn't be a gaming center and a payment app, and so on.
But that model of a closed ecosystem does really work commercially, and that's why some of the hated companies succeeded financially anyway. Maybe what's broken isn't the software industry, but the entire idea of how we should do business.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!