Showing rays reflecting off a surface is all very well, but what happens when you are looking at real waves, such as those on water?
The image below shows water waves as a series of lines, each representing the peak of a water wave. The green arrowed lines show their direction of motion.
When the wavefronts hit the barrier they reflect off in just the same way as a ray of light. That is:
angle i = angle r