Economics 101. In a free market, price is determined not by the cost of the product, but what the market will support.
If the market will support $40.00/gal for gas, then that's what the price will be, regardless of the cost of the product.
Think about it, how much does 1 liter of drinking water cost? What is the price of 1 liter of designer drinking water?
You are applying a basic discretionary economic model to a more complex situation. If you don't believe me switch to milk in order to drive your car to work the next time a gallon of gas exceeds milk costs. And that is not what I asked anyway.