Google (search) is an example of the former. Search is a very expensive business to be in, but most of the costs are in scraping, indexing and software development, not actual query execution. The more users you have, the more you can spend while still keeping margins constant, and the more you spend, the better your engine is, which gives you more users.
This leads to the situation where you only have two competing search engines[1], one of which sucks and only exists because it's propped up by Microsoft. However, this is only true as long as Google keeps their quality up. If Bing suddenly became significantly better than Google, people would gradually start switching.
20th century AT&T is an example of the latter phenomenon. It was a monopoly because of US regulations, which made the barriers to entry insanely high. This meant AT&T could set almost whatever prices they wanted, as consumers didn't have a choice anyway.
[1] Engines like Kagi or DDG don't count, as they still fundamentally rely on Google's or Bing's indexes.