Actually, virtually everything we eat stains our teeth. Coffee is one of the biggest culprits. Smoking, too, is a big no no.
Soda does not stain teeth so much as it destroys tooth enamel. The fizz of sodas acts as an acid on your teeth and the longer it is in your mouth the more damage it does. Simply swallowing does not help because even after you swallow small amounts of the soda remain in your mouth and on your teeth and this is when the real damage is done: in the hours the soda residue remains in your mouth.
Imagine the many situations in which you find yourself drinking a soda and it lingers in your mouth for hours: a long car drive, at a sporting event, watching TV, etc.
The single best practical thing you can do to help your teeth is to remove sodas and similarly carbonated drinks from your diet. If you can’t (or won’t) do that, the next best thing is to brush and rinse immediately after consuming such beverages. But who does that? Whether you’re in a bar, at a party, or at home most of us do not brush immediately after eating and drinking.
Failing brushing and rinsing, drink a glass of water after drinking any soda to clear the soda residue from your mouth.