In 2005, rising demand for oil in America and China and reduced supply of oil because of hurricanes Katrina and Rita caused the price of oil to rise, which resulted in very high profits for oil companies. This caused many business haters to demand that oil companies be punished for their good luck with price controls, windfall profits taxes, and prosecutions for price gouging.
Some years oil companies lose money. Some years oil companies make a small profit. Some years oil companies make enormous profits. Oil companies and investors are willing lose money in the hope that sometime in the future they will get lucky and make enormous profits. If the government prevents oil companies from making enormous profits some of the time, then oil companies and investors will be less willing to lose money other times. The result will be fewer oil companies, less competition, and higher oil prices.
Most of the big oil companies earn a profit most of the time, but there are also many smaller oil companies which lose money most of time. These smaller money losing oil companies provide competition to the big oil companies, which results in lower oil prices which benefit consumers. Without the possibility of make enormous profits, these smaller money losing oil companies would not exist, and there would be less competition, and oil prices would be higher, which would hurt consumers.
The oil industry is like a lottery. Most people who participate in lotteries lose money, but they participate anyway because they hope to win the jackpot. If the government confiscated windfall lottery winnings, there would be no hope of winning vast sums of money in lotteries, and no one would participate in lotteries.
To prevent higher oil prices, the government would have to subsidize oil companies which lose money. For example, George W. Bush used to have an oil company which lost a lot of money. Would the business haters be in favor of confiscating the profits of ExxonMobil and giving the money to George W. Bush?
High oil prices give oil companies an incentive to try increase production, and to repair the hurricane damage as quickly as possible. High oil prices also give consumers an incentive to reduce consumption.
If the government does not allow oil prices to rise, then there would be no incentive to increase production or decrease consumption, and there would be a too little oil available, which means that there would be gas lines and a black market in oil.
If the government reduced the profits of the oil companies, the oil companies would have less incentive to increase production to resolve the shortage, and oil prices would have to rise even higher to create enough incentive for oil companies to increase production and resolve the shortage.
If the government tried to prevent excessive profits by oil companies, how would the government decide what was a reasonable profit? Probably by commanding that oil companies charge no more than the cost of production. Then oil companies would have an incentive to waste as much money as possible, because the higher the cost of production, the more they can charge for oil.