Even without state intervention, utility companies tend to become local monopolies, duopolies, or non-competitive oligopolies because of the high barriers to entry. This makes it difficult for startups to compete with the incumbents.
In this case, legislation is much more effective at handling the second-tier consequences of utility companies (e.g. the natural tendency away from competition) than handling the problem itself (the high barriers to entry)