Yes that removes the discoloration. During welding the iron comes to the surface for some stainless (all?) and you need to remove that iron so it does not rust stain.
When you cut or weld stainless, you bring the whole alloy into contact with the surrounding atmosphere. Any ferrous components of the alloy are then free to rust. Passivizing the surface with acid or pickling paste, leaches the ferrous components of the alloy from the surface & leave a boundary layer that is resistant to corrosion. Electro-polishing the surface is another option.
Youtube actually has some good information on stainless & corrosion. This is a decent video to start with -
This one gives a good overview of the different types of SS families that you may run into.