"The villagers reared goat and buffalo" is the same as "The villagers reared goats and buffaloes" even though the noun forms used for the animals in the two sentences are different. Why can we use "goat" instead of "goats" and "buffalo" instead of "buffaloes" even when the villagers reared more than one goat and one buffalo? Shouldn't plural form be the only correct form for the animal nouns here?
There is a tendency to treat some herding animals as having the same plural form as the singular form. For some words this is always done: a sheep, many sheep; many deer. In other cases it is optional but may carry particular nuance: many fish/many fishes. This is the case with "buffalo" which can be used as a plural noun "There are many buffalo in the field"
For goats it is unusual to do this. The choice of the singular is probably influenced by the presence of "buffalo". It also gives the nuance of thinking of the product as "meat" (non-count) rather than "animal".
The villagers reared pork and beef.
The villagers reared pigs and cows.