The people who drill a hole in the ground and then a valuable product literally flows out of it, make more profits when prices of that product go up, compared to the refiners and resellers of the valuable product. I don't think this is mysterious?
Jokes aside, the upstream side has costs (both capex and opex) which are predominantly independent of the actual oil price, but income which is tied to it.
It's like with NVIDIA: their cost of producing a B200 is not directly related to the cost of (and demand for) Claude Code, but what they can charge for a B200 is.