This is a persistent annoyance in my current fortress; pastured livestock are getting scared by something, then scattering out of their pastures. I keep finding giant grey langurs and giant bluejays in places they shouldn't be.
All of my pastures are contained with doors, and I've even recently made sure that access to one pen does not require going through another, so as to avoid one type of animal maybe getting scared by whatever one the dwarves are dragging to the Farmer's Workshop or Butcher.
Similarly, I've elimated mixing species, so each species has its own pasture now. Yet animals are still getting scared out of their pastures.
Seeing other tame animals will not frighten pastured animals; tame cave dragons will not frighten tame sheep.
Are you having problems with wildlife invading your fort (crundles, kea, primates, etc) and running all over the place? They may run in fear from dwarfs and into a pasture, where they will frighten livestock once they become brave again. If this is happening, consider chaining some wardogs at strategic locations.
Do your pasture zones fill each room? If the pasture is too small, sometimes animals move one tile outside the pasture and that will trigger the job, so I always make pastures fill the room.
Are you butchering animals within sight of the pasture? That will make them afraid (but I am not sure if it will make them run).
I had three butcher workshops in the middle of a pasture to slaughter hundreds of turkeys, and most of the living turkeys were terrified from seeing other turkeys die.The only thing I can think that might be causing it is that I have a habit of channeling pastures one layer down from the surface, then flooring over the resulting pasture. While this prevents things jumping into the fortress through my pastures. it does also mean that they qualify as "Outside."
Could it be that pastured animals are getting scared by wildlife walking or flying over the roof of their pasture?
If the roof over the pasture is complete, there will be no line-of-sight.