The Gemara Berachos (31b) describes the beginning of Shemuel Hanavi's life in the following way. Chana was childless and she came to the Mishkan in Shilo to davven for a child. She promised Hashem that if Hashem will grant her a son, she will dedicate him to Hashem meaning that she will bring him to Shilo, the place of the Mishkan, so he can live his live totally for Hashem.
Hashem answered her prayers, and Chana gave birth. After two years she came to Shilo to bring korbonos and she also brought her son Shemuel as she promised Hashem. When they arrived she looked for a Kohain to shecht her korbon but couldn' find one and Shemuel, her two year old son, passkend that even a Yisroel was allowed to shecht a korbon and a Cohain is not needed. He learnt this halacha from the possuk, "And he should shecht the bull before Hashem and the sons of Aharon, the Cohanim, should bring the blood and sprinkle the blood on the mizbayach...", which implies that Cohanim are only needed from the time that they catch the blood but they are not needed to shecht.
It seems that the custom in those days was that only Kohanim shechted korbonos, so Eli, who was the Gadol Hador, said to Shemuel, why did he do such a thing. Shemuel proofed his position from the possuk.
Eli replied to the young child Shemuel that even though you spoke well, you issued a halachic ruling in front of your teacher and anyone who gives a halachic ruling in front of his rebbi is liable for death!" Channah came and shouted before him (Eli): "I am the woman who stood here with you and prayed before Hashem. It was this boy I prayed for; and Hashem has granted me what I asked of Him". Shemuel was spared and stayed in Shilo with Eli HaCohain.
Chana's words, "I am the woman who stood here with you" and she did not simply say, "I am the woman who stood here", implies that Channa wanted to stress that when she prayed for a child not only was she standing but Eli was also standing. Zera Shimshon asks why was it so important that Eli also stood at that time that? What difference would it make if he was standing or sitting at the time Chana prayed? It would seem that this was only something incidental and not worth mentioning.
Chana's Argument and the Bais Yosef's Explanation
He answers in light of what HaRav Yosef Karo (the author of the Shulchan Aruch 1488-1575) wrote in the Bais Yosef (siman 102) that although one is forbidden to sit himself down within four amos of someone who davvens, if one was already sitting and a second person came close to him and began to davven he is not obligated to stand up but can remain sitting.
However, adds the Bais Yosef, this person who began to davven close to someone who is sitting did not act properly. The reason for this is that a third person who sees him sitting will not know that he sat down before the other one started to davven and it will give the impression that he is a heretic since he is not also davvening!
Therefore, continues the Bais Yosef, even though that he is not obligated to stand if he is a person who painstakingly performs mitzvos with all of its details, it is preferable that he stands for two reasons. Firstly, not to disgrace the one who is davvening for acting improperly and secondly not to disgrace himself for looking like a heretic!
The Bais Yosef concludes that this was the reason that Eli stood when Channa prayed. According to this, Zera Shimshon explains that Channa held that Shemuel was not liable for the death penalty because he didn’t really pasken the halacha that even a non-cohain can slaughter a korbon. He only related a type of prophecy that he had and the prohibition is only to say a halacha derived from a person’s own intelligence. (Remember he was only two years old at the time!)
To convince Eli of this, she explained to him that if he held that Shemuel paskened using his own intelligence and therefore he deserves the death penalty, then he will be disgracing Shemuel for transgressing the prohibition to pasken in front of his teacher and he will also be disgracing himself for not thinking of the derasha of Shemuel.
She therefore reminded him that two years previously, when she prayed to have a child, Eli himself didn’t remain seated in order not to disgrace Chana and himself. He should therefore use the same reasoning here not to disgrace himself and Shemuel and spare the life of her child Shemuel!
In other words, Chana's mentioning that Eli standed when she prayed for Shemuel was not an unimportant detail but was part of her argument to save Shemuel!