Because “gas” is an informal and quicker way of saying gasoline that was adopted by the general public for convenience sake.
Language doesn’t exist to be technically correct, it exists to facilitate practical conversation. The more you look at it from this perspective the more things will start to make sense.
Gasoline is liquid but gasses on the periodic table of elements are fumes, so why do we call the stuff we put into our vehicles "gas," if it's liquid?