I think the name "sanding sealer" is a misnomer. The purpose of this surface coating is to level out the microscopic gullies in the woods surface with a material that itself can be sanded to remove the microscopic peaks. It provides for a smoother surface than was achieved by sanding bare wood alone. Further coatings, such as varnish or paint can then be applied over this initial surface coating. In the paint example this can help prevent the grain pattern from telegraphing through, with varnish it will leave the surface smoother to the touch.
Sanding sealers do not really seal any more than any other surface coating. All coatings provide some barrier, some more than others, but nothing short of molten plastic is impermeable to water vapor. The only place where sanding sealer may in fact provide for some sealing is when dye stain is applied after the sealer. I believe that some of the dye will penetrate, but sealer may modulate how much and where. I think there may be an effect with pigment stains, as well, but I'm not sure.
Sanding sealer is most commonly a dilute (1 pound cut) of shellac, which has the advantage that shellac adheres to all other coatings. I believe there are sanding sealer products based on lacquer, as well. A good resource on finishes (surface coatings) is Flexner's book, Understanding Finishes.