Whenever a shulker is spawned on a wall or ceiling, the head of the shulker will be rotated depending on which one it is.
For example: When a shulker is clinging onto a wall, its head will be rotated sideways, and when it's clinging onto a ceiling, its head will be rotated fully upside-down.
The screenshots below will demonstrate this. (Ignore how the End looks all rainbow-like, that's just my texture pack)
Probably Related MC-212531