"To have gas" is a more polite phrase for farting. Most automobiles are powered by internal combustion engines whose fuel source is gasoline, or "gas" for short. The pun draws on the two meanings of "gas".
Why was the car embarrassed ? Because it had gas !