In certain situations where an anticompetitive monopoly exists, the government does and should regulate. Take, for example, the birth of cable tv in the US. The cable companies were granted monopoly in regions because otherwise it was senseless to commit the funds to build the infrastructure necessary to develop the industry. In this case, the trade-off is; yes, you get a monopoly but we're going to regulate the prices.
Same with utilities (water, sewer, electric,...).
Many times, however, the regulation is a farce (the regulators and the regulated are all friends). In some cases, the government steps in to see what the shenanigans are.
Usually the defending companies argue that their increased margin is needed for "future investment costs," or something. Sometimes the regulators agree, sometimes not.
So, yes, in certain cases where a few tightly-knit companies are committed to control essential resources, they are "forced" to sell at "reasonable" prices.
Interesting that you bring up software companies. In the 1992 presidential election, the deciding issue to me was the building of the internet. Bush (41) wanted to let the private companies do it all a la cable, sewer, etc. Clinton said, no, it was to be a vital infrastructure to our country and the government should build it (a la our interstate highway system).
I voted for Clinton.