We know that lord Hanuman was present and protected Arjuna’s chariot in the war of Mahabharata.
But very few know the story behind why did this happened. So the story goes something like this..
Arjuna was once on a pilgrimage, touring the land with many saints. After covering various shrines, they reached Rameswaram, south India.
During the age of Ramayana, lord Rama had established a Sivalinga there, seeking the blessings of lord Siva before commencing his journey to Lanka to rescue his wife Sita. With the help of the army of monkeys and bears, they constructed a bridge of stones and trees across the vast ocean.
Arjuna looked amazed at the remains of the bridge that had survived. He wondered, "Why did a great archer like Rama had to rely on creatures like monkeys and bears to build a bridge? Why couldn't he have instead bridged the distance with arrows?"
None of the pilgrims had an answer.
Then, a small monkey who had been following the company for quite some distance laughed out and replied to his question. "A bridge of arrows?! O prince, are you aware of the might of the monkeys of old? Stalwarts like Sugreeva, Nala, Neela, Angada and Hanuman adorned their ranks. No bridge of arrows could have withstood their weight. Why, no bridge of arrows could even withstand my weight, puny as I am!"
Arjuna was quick to take up what he perceived as an implied challenge. "Let us have a wager. I shall lay down a bridge of arrows. I am willing to burn myself if it fails to bear your weight."
The monkey agreed. Arjuna, taking the aid of his famed quiver of inexhaustible arrows, laid down a bridge across the ocean. The monkey jumped onto it and no sooner had he walked ten paces than the bridge collapsed.
Arjuna helped the monkey out of the water and asked for another attempt. The monkey agreed.
Arjuna constructed another bridge, this time laying his arrows closer to each other, and asked the monkey to try again. The monkey set out on the bridge in the direction of the island of Lanka yet again but the bridge collapsed.
Arjuna was ashamed of himself. Not wasting any more time, he prepared a pyre and was about to step into it and give up his life, in accordance with the terms of the wager when a youth held him back and stopped him.
"What were you about to do, o mighty prince?", asked the boy, surprised.
"I was given a challenge and I failed. I do not wish to continue with this life now that I have faced such great shame", replied Arjuna.
The boy was aghast. "But was there an adjudicator? Who was there to see if the challenger was playing fair? A contest without a judge is meaningless. Pray construct another bridge and this time, I shall be the judge."
Neither Arjuna, nor the monkey could refute the boy's argument and so they got ready for a third round. Infused with some confidence, Arjuna built a third bridge, using every bit of his ingenuity.
"There! Try crossing it now", he said to the monkey. The monkey happily obliged.
He walked on, but the bridge was still solid. "He must have locked the arrows together better this time", thought the monkey to himself. He began to jump on the bridge but it did not collapse. It stayed strong.
The monkey was surprised. "Let me take on the form I took while leaping across the ocean", he thought and lo! He was large as a mountain now.
Arjuna was awestruck when he saw that his challenger was none other than the great Hanuman himself.
He bowed his head in reverence, realizing that sooner or later his bridge would succumb to the strength of the great monkey. His foolishness in assuming that a bridge of arrows would bear warriors like Hanuman became quite apparent to him.
He was humbled.
However, the bridge did not collapse. Not even under the weight of the now gigantic Hanuman. Arjuna was nonplussed. He could not comprehend what was happening. There seemed to be no logical explanation as to why the bridge hadn't broken yet.
Apparently, Hanuman couldn't fathom things either. He began jumping on the bridge but it still wouldn't yield. All the while the boy was smiling. In a moment of enlightenment, it struck both participants of the contest that their adjudicator was no ordinary boy.
Arjuna and Hanuman fell at his feet and then Vishnu was standing before them. "I am Rama, and I am Krishna. I protected your bridge from collapsing, Arjuna. May this be a lesson in humility for you. Vanity and pride undo the best of men. Dear Hanuman, you should have known better than to humiliate Arjuna thus. He is a fine warrior, one of the best of his times. How could you drive him into giving up his life?"
Arjuna and Hanuman sought the Lord's forgiveness and He blessed them.
"As an act of remorse, I shall stabilize and protect your chariot in the great battle that is imminent.", said Hanuman. "So be it. You shall be present on the banner of Arjuna's chariot when he rides out to do battle in the great war of his age that is to come.