The bug
Mobs in boats move / shake their head when attacked.
Note: The mobs sometimes rotate their heads to the very left or right as well without rotating the boat before, see MC-90148.
How to reproduce
Put for example a sheep in a boat
/summon boat ~ ~ ~ {Passengers:[{id:sheep}]}
Hit it without killing it
This will work for any mob in a boat that will "panic" when hurt. It is confirmed for 1.9.3 Pre 2