The reasons for revealing Odysseus’s name and putting his men in more danger were his anger and pride. As one of the Greek heroes, he paid much attention to the glory and desired to be remembered as a courageous, magnificent, and muscular man who managed to invent and realize a tricky plan.
Detailed answer:
Having appeared in the cave, Odysseus did not reveal his real name in the conversation with Polyphemus. Instead of that, he said that his name was Nobody. Later, his wit trick became clear – he intended to prevent Polyphemus from the ability to call for help fruitfully when Odysseus was escaping. His escaping plan was not less sneaky and tricky too. While trapped in the cave, he was afraid of whether cyclops would eat him and his men. Odysseus managed to prepare a sharp and long club and convinced Polyphemus to drink a great wine amount.
Then, during a conversation, the main character betrayed Polyphemus by telling his name as Nobody. Odysseus claimed:
“Cyclops, you asked about my famous name.
I’ll tell you. Then you can offer me a gift,
as your guest. My name is Nobody.
My father and mother, all my other friends—
they call me Nobody.”
Having got drunk, Polyphemus fell asleep, and Odysseus and his men seized the moment. They used their wooden clubs, which were prepared in advance, to blind Polyphemus. At this moment, the idea occurred in the main character’s mind. Polyphemus started to cry for help, but the only response he received was:
“Well, then,
if nobody is hurting you and you’re alone,
it must be sickness given by great Zeus,
one you can’t escape. So say your prayers
to our father, lord Poseidon.”
His friends were unable to help him. They thought that Polyphemus was sick and needed some time to rest. Such a reaction allowed Odysseus and his men to escape without any disturbances. They clung to the bottom of the ship, which was on the exit of the cave. This way, Odysseus’s tricky plan appeared to be successful, and nobody could prevent them from escaping. After the escapade, Odysseus revealed his name to Polyphemus and put his men in more danger. Being furious, Polyphemus desired revenge and caused the storm, which wrecked the ship. This adventure illustrated the traits of Odysseus’s character, such as inventiveness and fearlessness.
As for the reasons for such an action, heroes of Greek mythology and epic literature were keen on doughtiness, honor, courage, and moral principles. They never missed an opportunity to demonstrate these traits of character and achieve glory. This way, the major motives for taking this reckless action were Odysseus’s anger and pride. He wanted Polyphemus to remember who he was defeated by.