China’s big oil companies may all be controlled by the government, but they’re becoming increasingly stark examples of how some state enterprises thrive amid challenges while others falter.

The nation’s three big energy companies ostensibly have the same goals: produce or procure enough oil and gas to feed China’s economy, while turning healthy enough profits to keep investors happy.

The...