Because of internal friction between layers of mud particles called viscosity. When you walk, your foot exerts a force on the mud; and according to Newton, the mud also (is supposed to) exert an equal opposite force, which leading to an equal net resultant force in your direction, propelling you forward.