Animal companions of Rama were not ordinary animals. They were specially created children of gods.
When Vishnu attained the sonship of the great-souled king Dasharatha, then Brahma the self-created addressed all of the gods this way. [1-17-1]
"Let mighty and guise changing helpmates be procreated to that truth abiding and valorous Vishnu who is the well-wisher of all of us. [1-17-2]
"Let monkey-shaped progeny equalling Vishnu's valour be procreated from the physiques of prominent apsara-s and gandharva-s, from the girls of yaksha-s and pannaga-s, and also thus from the bodies of kinnaraa-s, she-vidyaadharaa-s, she-riksha-s and she-monkeys, and they shall be wizards of miracles and audacious ones, in travel they shall have air's speed, bestowed with intellect they shall be the knowers of ideation, and with their divine physique they shall be ineliminable, they shall be endowed with all the assaultive aspects of all missiles, and they shall be untiring in their efforts, like you who thrive on amrita, the ambrosia, unmindful of thirst and hunger. [1-17-3, 4, 5, 6]
"I have already created the eminent bear Jambavanta in earlier times, as he suddenly came forth from my yawning face. [1-17-7]
This is to say that Brahma has already created such a typical being, namely Jambavanta, prior to all the gods, as a role model in creation.
Thus the gods have procreated many thousands of such valorous and guise changing monkeys who with their immeasurable strength and bravery are manifest for the elimination of the decahedral demon Ravana. [1-17-17b, 18a]
And they with their elephantine, mountainous and prodigious bodies quickly took birth in bears, monkeys, sacred langoors. [1-17-18b, 19a]
Some of the vanara-s endowed with superior valour are born to female langoors, and like that some more to female bears and kinnaraa-s. [1-17-20b, 21a]