Because most flammable liquids are synthesized using oil.
There are other fuels used for vehicles, like diesel. This is usually synthesized with oil, but I believe it can also be synthesized from waste and electrical power (defeating the purpose, perhaps).
NOS is something you've probably seen in a Honda Civic. Nitrates and other high explosives are often synthesized using oil, but even if they use natural sources they're extremely inefficient compared to octane. We're talking about an order of magnitude difference in mass and volume per unit of energy. Explosives contain their own oxygen which makes them burn faster, but it's inferior to a similar option (turbocharging).
Now, we could just *burn* hydrogen. When hydrogen is combusted it combines with oxygen forming water. It would produce an explosive energy output, which might be enough to drive a piston. But once again you're dealing with a lower energy output per mass. All of the energy of octane is held up in the chemical bonds, and elemental hydrogen doesn't have chemical bonds! So this is an extremely small amount of energy, and you're dealing with an extremely dangerous tank of fuel - lighter than air and violently explosive. Every car wreck would be a repeat of the Hindenburg disaster.
Hydrogen fuel cells work by passing a hydrogen or hydrogen-containing compound (such as methanol, which is easily extracted from some species of tree) over a platinum catalyst and then near a special polymer film (OIL) called a Proton Exchange Membrane. This allows the Hydrogen + Oxygen -> Water reaction to take place slowly (non-explosively) and causes the reactant's electrons to zip through the car's circuitry before joining the reaction on the other side. It's safe, it's clean, but it'd still produce water and carbon dioxide as reactants. Very little heat exhaust, though, making it theoretically ~30% more efficient than an internal combustion engine (as I understand it).
One potential solution to our material reliance on oil is Thermal Depolymerization (TDP) technology, but it's still unproven, costly to install and it requires large quantities of organic waste to produce a significant amount of oil. The reactor itself is powered partially by burning its byproducts, but it may produce a passable amount of oil at some point in the future.