The bug
Mobs and players sometimes dismount vehicles in a dangerous place.
Dangerous places include:
Lava
Fire
Magma block
Campfire
Cactus
Sweet berry bush
Wither rose
Soul fire
The void
Linked issues
relates to 2
Attachments
Comments 6
Relates to [MC-52274] (but is not a duplicate); also, reproduced.
This happens only with boats, and only when the boats are destroyed. It also happens to players if you manage to destroy the boat on which you are riding (you can easily do this by getting a boat, looking down, and then lighting a flint and steel below you).
The entity is dismounted in the direction it is looking, regardless as to whether doing so is safe.
EDIT to previous comment: Sorry! I didn't realize what you were saying. I thought you meant mobs "drove" the boats to dangerous places.
@unknown Players dismount where they look, mobs dismount at a close by spot, no matter if they look there.
Please don't troll, it only causes trouble for you, and for us trying to help.