Aren't you ignoring the energy required to turn crude oil into gasoline in the first place ?
Of course. You’re testing a system. The gasoline motor is a system. That’s what black box testing is. And this system was tested & the finding is that it has 10,000 times more energy density than gasoline.