Well, takes energy just to run a drill to get down to it in the first place. Nuthin us free!
Of course.
But one must consider EROI when calculating whether or not it is profitable to drill/mine for energy.
EROI = Energy returned on energy invested.
If you are expending the close tot the same amount of energy to extract/process/ship the oil than the amount of energy extracted, that oil becomes unprofitable to extract ... or super expensive to buy.