The artist either made a mistake or his drawing is incomplete. I think that he should have added a few labels.
As far as I can see, he did not draw the rays of light. The rays of light in a dielectric (i.e., electrical insulator) are always perpendicular to the wave fronts.
I am not sure what he meant by those "bracket" lines at the ends of the wavefront which pass through the interface between the medium. I call them the bracket lines since they seem to bracket the wave fronts. I don't have anyway to draw the figures so let me use words.
If the bracket lines were intended to represent the rays of light, then they were drawn incorrectly on below the interface. The rays indicate the direction of the light beam. The rays in an electrical insulator (e.g., vacuum, air, water, glass) are always perpendicular to the wave fronts. The bracket lines below the interface are not perpendicular to the wave fronts. Therefore, the bracket lines can't indicate the direction of the ray below the interface.
It is hard to read a diagram without labels, especially if there is an unknown mistake in it. Apparently, you interpreted the bracket lines as rays. The bracket lines in this diagram do not show the direction of the light beam. I think that they should have been left out of the diagram altogether.
I suggest that the rays of light should have been drawn in the middle of the wave fronts. The rays should be drawn perpendicular to the wave fronts.
The important thing in a diagram is what the lines and curves in it mean. Therefore, I suggest that when one asks a question using a diagram, one should always label the parts of the diagram with words. It is much easier to discuss the physics of the diagram, because then one can use the words in the labels. Sometimes, a word can be worth a thousand pictures.