When a mob is at the end of a flowing water steam that is 5 blocks long (including the source block), they try to get out but don't jump to try and get out. This also occurs with 4 block long streams, however, it is less consistent. I've noticed through testing that they can eventually escape after several minutes.
Note: This does not affect all mobs. It seems to affect villagers (+ variants), chickens, creepers, cows and goats.
To reproduce, setup a stream as pictured and spawn a mob at the end:
[media]
I can also confirm this happens on 1.13.2 & 1.13.1. It also seems to be for flowing water blocks with a 4+ block length and affects mobs such as zombies, creepers and skeletons.