A product exists and you extract it. You calculate the costs of extraction + everything else, and try to sell it at a reasonable price to make a profit.
One you can do with your hands, the other you need heavy machinery.
Let me be clear with this since there appears to be an issue with me showing my thoughts via written form:
Topic -$3.75 /g at the pump for gas is a miracle.
My point: It's not a miracle, we are paying what we are supposed to be paying.
Agreed that the market price of gas is the "correct" value because it is what the market will bear. In 2008 people revolted against gas prices by driving less, carpooling, etc., and prices plunged. Why? Because demand plunged.
That said, the point other posters are making is that you are greatly over simplifying the oil extraction, refining, and distribution process. You are also ignoring the fact that there is a great deal of uncertainty in drilling. Tools are better now, but to this day it is uncertain whether a drill will hit anything until millions are spent. Lots of sunk costs if it does not. Its not like milking a cow. 99.9% of dairy cows product milk. Far less oil wells produce oil.
You might be shocked that many oil drilling companies are more water companies than they are oil companies. As oil is extracted the production of a well diminishes, until the well ultimately needs to be pressured to enhance extraction. That's been done with water for years. Pretty soon it will be done with CO2. Expensive, expensive, expensive.
That said I see your point that the market price of gas is what it "should" be. But it is pretty hard not to marvel at the fact that a product that is enormously expensive and difficult to extract can be purchased in refined form for as little as $4/gallon. The only way that happens is volume and market pressure. Mainly volume as gas is for the most part an inelastic commodity.