Over the years, teams come up with creative ways to increase power output while still complying with the F1 rulebook. Then the FIA tends to ban the new methods or otherwise limit the engines in order to keep power output down. Power peaked in the early-mid 2000's with the 3.0L V10 format, with some engines producing as much as 950bhp at nearly 20,000 RPM.
The primary reasons for managing engine output are driver safety and development cost. In the early 2000's, Ferrari spent an average of $300M/year on their Formula 1 efforts. The cost to be competitive in F1 led to some manufacturers pulling out of the sport. Limiting engine specifications and the number of engines a team can use in a season has helped bring down the costs, and the sport now has a full grid of teams participating.