Shock waves arises in astrophysics in accretion flows and in winds. But we know that shock waves usually occurs in supersonic flows when the flow encounters any obstacle or when the properties of the medium changes abruptly.
In astrophysical shock waves, we consider abrupt changes in various physical quantities (such as local sound speed, flow velocity, entropy etc.) across a surface and use the conservation of fluxes of mass and momentum across the surface.
My question is regarding the reason that some physical quantities varies discontinuously across any surface. What might be the physical reason behind these discontinuities?