Hi George.
This is stretching my knowledge a bit, but here goes...
When melting iron in a cupola for casting etc, flux is added in the form of limestone to remove non-metallic impurities. These impurities then float to the top of the molten iron and form a slag cap which effectively prevents air coming into contact with the iron. Periodically the slag is tapped off. The molten iron is always removed from the bottom of the cupola as this is where the 'cleanest' material lies.
The molten iron is then often treated by adjusting the temperature and adding calcium carbide or similar desulphurising agent. Magnesium treatment is also carried out if SG iron is required. Finally, the iron is innoculated by adding a mixture based on ferro silicon immediately before the pour.
With molten steel, basic slags are used to control the levels of phosphorous and sulphur, and the steel is 'boiled' by injecting oxigen into the molten bath which removes unwanted disolved gasses. In some steelworks Argon Oxigen Decarburisation (AOD) is practiced in treating stainless and low alloy steels.
By the above methods, most unwanted impurities are removed before the pour, and the pour itself (if done properly ie smoothly) will not pick up any further impurities from the surrounding atmosphere.
When electric welding, the transfer of metal from electrode to workpiece is quite violent and results in the entrapment of impurities from the surrounding atmosphere and the workpiece. Thus either a shielding gas is required to keep the atmosphere inert, or a flux is used to form a slag to remove the impurities from the weld pool. Oxy Acetylene welding is less violent so you can generally get away with not using a flux or shielding gas.
Re-reading the welding bit above it doesn't sound quite right, but you get the general idea. Again, someone on here will be able to give a better explanation of the welding requirements for shielding gas and flux.
Steve