Animals occupy a strange niche in the world of fantasy roleplaying games. On the one hand, they can often be grouped, along with mundane humans, as part of the mundane and natural world as distinctive from the world of the magical and the mystical. Basically, more or less how modern science might view them (or at least how we might think modern science might view them). Historically, the separation between the mystical and the mundane haven't always been so clear-cut, and animals were sometimes ascribed properties that we today would mark as unnatural. (More on this in a later entry)
On the other hand, we often overemphasize animal behaviors or even ascribe to them behaviors that they don't do in real life. For example, predators are fairly common results on random encounter charts, and it seems just about as common for them to be treated as simple mindless cannon fodder that attack large, well-armed groups of adventurers unprovoked. (Not that this characterization is alien to folklore, however)
|Napad wilków (Wolves attack) by Józef Chełmoński (1883) at the Museum of Polish Army, Warsaw, Poland|
Now, this isn't to say that animals can't make for interesting random encounters, but including some context for hostile encounters can make the game world more immersive or even foreshadow at other threats in the area. For example, animals are often the minions of powerful evils like the darklords of Ravenloft. Animals acting unusually aggressive, when natural causes have been eliminated, might indicate some unnatural influence or taint in the environment they occupy.
Because of the importance of context, I have created the following random table to provide an attack motivation for hostile animal encounters.
1d20: Random animal attack motivations
1-3: Defending nearby young
8-11: Afflicted with rabies or other disease that has driven the animals mad.
12-13: Past encounters with humans have taught the animals not to fear humans.
13-14: Animals have escaped captivity from an abusive master.
15-16: An unnatural taint has afflicted the local area, warping the flora and fauna.
17-18: The animals are led by an intelligent shapeshifting being that hides among their ranks. (Example: jackalwere with normal jackals).
19: The animals are spiritual avatars of an offended nature spirit.
20: The animals have been sent by some great but unknown evil to dispatch the player characters specifically. Somehow they have earned the enmity of some powerful force.