When a immovable entitiy(all non-mob entities, mobs with NoAI tag, slime, magma cubes, all flying mobs) "ride" a mob, this mob don't wander when it's spare. And all mobs with passengers can't be pushed by another mob with passengers.
It don't happen when a marker entity "ride" a mob.
Interestingly mobs can go into panic mode when hit, but will stop moving after