In 2009, the industrial price of electricity in California is around $0.10 / kWh. That's $0.028 / MJ. The current price of diesel oil is $2.801 / gallon, which is $0.616 / litre which is $0.016 /MJ (assuming 38.6 MJ/l as the heat of combustion of diesel oil).
So diesel oil is $0.016 / MJ while electricity is $0.028. As you can see, electricity is a _lot_ more expensive in ideal circumstances (all the energy is converted to useful work). Now obviously, not all of the heat in the combustion engine can be converted to mechanical energy so there's quite a loss there while electrical engines have very good energy efficieny ratios, but still, oil is a lot cheaper than electricity, and that is the main reason it is used as the primary energy source.
EDIT: I have made a huge (100x) mistake, thanks for eru for spotting it, it's corrected now. Still, my point stands.