Mobs (in particular sheep and cows), pass through fenced in areas. For example: while holding a piece of wheat a Sheep follows me, it is trapped in a Cobblestone fence area and after a while(varying from 5 seconds- 30 seconds) the sheep moves through the fenced area out to the open where it may roam off accordingly.
Duplicate of MC-2025, please use the search function to see if your bug has already been submitted. Currently over 58% of tickets are being resolved as duplicate.