As can be seen, the ray continues to be reflected at the same angle all down the length of the core with none being refracted by the cladding. This is the process of total internal reflection. Of course if you had the light source emitting exactly on the axis and at the centre of the core, the ray would follow a straight line, but given the physical size of the cores this is difficult to achieve.