In many cases it makes sense to spend more energy in extracting oil than the energy available in the oil itself. This is because oil is mobile energy. It can be easily transported and stored. Also, much of modern infrastructure depends on energy in liquid form, eg. cars, airplanes, farming equirpment etc. There may be plentiful nuclear, solar, coal, or natural gas energy, but it's useless in many cases because the current infrastructure can not use it. So it does make sense for example to use a certain amount of nuclear energy to get a lesser amount of energy in the form of oil.