The wave front model of refraction on an interface makes it clear why the direction of the sound propagation changes.
The graphic illustrates the case when the speed of propagation becomes slower at the transition from the first to the second medium: The wave is broken at the perpendicular of the boundary surface.
An explanation of this phenomenon is provided by the Huygens' Principle: Every point on a wave front is the starting point for a new wave, known as an “elementary wave". The enclosing end of the elementary wave creates the new wave front.
Information and ideas:
Refraction at boundaries also occurs with sound waves (for example, in the atmosphere at the transition from warm to cold layers of air).
Relevant for teaching:
Vibrations and waves