Animal calls are all based on a variety of factors. Primarily, what ecological niche they fit into. Cows, for example, roam wide open spaces where deeper sounds travel further. They're also quite a large ungulate hence their voice chords are sufficiently large to produce such a sound. In the case of sheep, its a similar story. However sheep (even historically before domestication) roam also wide open spaces, often rocky and hilly, but with many hundreds of other sheep. Their particular baaa call contains more varying frequencies than a simple moo, and so individuals can be identified by their young, mothers etc.
In essence, all animal calls have been adapted to fit into their ecology, habitat etc: so where they live, if they're a social species, how large they are, if they're predated by any animals, how secretive they need to be etc.
OCUK never ceases to amaze me on a Sunday morning!