The equation of continuity is a special case of the law of conservation of
Mass
Momentum
Angular momentum
Energy
For the pipe of varying cross-section, the mass of liquid flowing out equals the mass flowing in. This follows the law of conservation of mass.