Why does a light ray incident on a rectangular glass slab immersed in any medium emerges parallel to itself ? Explain using a diagram

Consider the diagram shown.

In Fig, EO is the incident ray, OO’ is the refracted ray and O’H is the emergent ray. The extent of bending of the ray of light at the opposite parallel faces AB (air-glass interface) and CD (glass-air interface) of the rectangular glass slab is equal and opposite. This is why the ray emerges parallel to the incident ray. However, the light ray is shifted sideward slightly.