The Bet Ha’levi (Rav Yosef Dov Soloveitchik of Brisk, 1820-1892) addressed the question regarding the proper protocol when two people enter the synagogue together while one is wearing Tallit and Tefillin and the other is carrying his Tallit and Tefillin. Which person should be given the honor of entering first?
The Bet Halevi writes that the one who is carrying his Tallit and Tefillin should be granted the privilege of entering first. He notes that when a person enters a house affected by Sara’at, he becomes Tameh (ritually impure) as do any garments or utensils that he is carrying. The clothes on his body, however, are not considered independent entities, as they are being worn, and hence they do not contract Tum’a. This indicates that articles which a person carries are more significant than those which he wears, and thus the Bet Halevi concludes that one who is carrying his Tallit and Tefillin should be given precedence over one who is wearing his Tallit and Tefillin.
However, Halacha does not follow this ruling of the Bet Ha’levi. It seems clear that a person wearing Tallit and Tefillin is on a higher level at that moment than the person carrying his Tallit and Tefillin, because the one wearing his Tallit and Tefillin is already performing a Misva, and not merely preparing to perform a Misva. Halacha requires according honor to a person involved in a Misva, as indicated by the Mishna in Masechet Bikkurim, which states that when the shopkeepers of Jerusalem would see people bringing their Bikkurim (first fruits) to the Bet Ha’mikdash, they would stop their work and go out and stand in the people’s honor. By the same token, the person carrying his Tallit and Tefillin should show honor to the person wearing his Tallit and Tefillin, who is currently performing a Misva. Moreover, the Zohar writes that it is proper to walk into the synagogue only after having donned the Tallit and Tefillin, adding that one who does so is escorted by angels. Hence, the person wearing Tallit and Tefillin is accompanied by angels and should thus certainly be given the honor of entering first. (This Halacha is noted in Mehkereh Eretz, vol. 4.)
However, if two people are walking into the building, one of whom is carrying his Tallit and Tefillin while the other is not (such as if his Tallit and Tefillin are already inside the building), the one carrying his Tallit and Tefillin should walk in first. Some communities have the custom that if the Rabbi enters the synagogue without his Tallit and Tefillin together with somebody who is carrying his Tallit and Tefillin, the congregant gives his Tallit and Tefillin to the Rabbi so the Rabbi may enter the synagogue first.
The rule requiring giving honor to those involved in a Misva has other applications, as well. For example, this is the reason why people stand when a baby is brought in for a Berit Mila. Since the family and the Mohel are coming to perform a Misva, they are given this honor. By the same token, it would be proper to stand during a Pidyon Ha’ben, when the father gives the Kohen the money, to give him honor as he performs this Misva. In fact, the Talmudic source of this concept – as mentioned earlier – is Bikkurim, when farmers bring their first fruits to the Bet Ha’mikdash. If these farmers deserve honor for fulfilling the Misva of first fruits, certainly the father performing the Misva with his firstborn son should be given honor.
Likewise, the custom in Jerusalem is to stand during a Huppa, to give honor to the bride and groom who are involved in a Misva. (This is done also because the Shechina is present at a Huppa, as indicated by the Beracha, "She’ha’simha Bim’ono.") Our custom is to sit during a Huppa ceremony in the interest of maintaining proper decorum, and the Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909), in his work Od Yosef Hai, writes that this was the custom in Baghdad. In Jerusalem, however, the custom is to stand to give honor to those involved in the Misva.
Summary: Halacha requires showing honor to those involved in a Misva, which is why we stand at a Berit Mila. For the same reason, it is proper to stand during a Pidyon Ha’ben, and if two people enter the synagogue together and one of them is already wearing Tallit and Tefillin, he is given the honor of entering first.