If you spectate certain mobs, your camera won't follow the head movements of the mob you are spectating. You will enter spectator mode facing the direction the mob is looking at that time and stay that way. Should the mob then move their head, your camera won't move.
Going into F5 mode will reflect this as well. The mob can be looking sideways but your camera will not track it.
To test this, try to spectate a cow and watch as your camera follows the head movements. Then spawn a zombie and try it again. It won't work.
The mobs that currently experience this bug are:
Zombies
Skeletons
Blazes
Zombie Pigmen
Endermen
Witches
Spiders
Cave Spiders
Possibly ocelots, for some reason they stop moving when you enter spectator mode
Linked issues
duplicates 1
Attachments
Comments 3
Dupe of MC-46656
Confirmed (also for Spiders)