Why does baking soda and vinegar remove stains?
You might try a comparison test to see if baking soda and vinegar is any more effective than plain water, or water and one of the ingredients. There are some possible reasons why each might be effective:


Some dyes and stains are set by exposure to acid, such as vinegar, which makes them harder to remove. It is possible that alkaline baking soda and water have the opposite effect, removing the stain.
Some stains, such as from red cabbage and red wine, are indicators, and change color when exposed to alkali or acid. The natural dye alizarin changes from dark red to lighter yellow under acid conditions, as in vinegar.
A powder such as baking soda may act as a sponge or adsorbent because of its large surface area. Talcum powder, baking soda or fuller's earth are also used for that purpose.
There might be a physical effect from the bubbles, as you state. For that reason, perhaps, some use plain seltzer (carbonated water) for stain removal.


Note that there are many conflicting statements on the efficacy of these stain removal techniques. It would be of benefit to humanity if someone conducted controlled experiments on removing a variety of stains with these chemicals! In the meantime, I just put a bit of HE laundry detergent on a stain, or a commercial cleaner such Lestoil, on the spot, before laundering.