Question: Why does the congregation stand every time the shofar is blown?
Answer: The Mishnah Berurah (Orach Chayim 585:2) notes that according to halacha one need not stand for all the tekiot. Indeed, some of them are explicitly called “the sitting tekiot.” The reason that most people stand nonetheless is based on the following:
The Mishnah (Bikkurim 3:3) relates that when pilgrims brought bikkurim to Jerusalem, “all the craftsmen would stand before them.” Commenting upon this, R. Yosi bar Abin remarked, “Come and see how beloved a mitzvah is while it is being performed. For all stood for the pilgrims and not for Torah scholars.”
But why did these people stand only for those bringing bikkurim. What about all the other mitzvot that people perform? Why not stand when one sees these other mitzvot being performed as well?
The Maharsha (Kiddushin 33a) answers this question by citing the commentary of the Rambam on the Mishnah in Bikkurim who says that the mitzvah of bikkurim was unique in that an entire tzibbur, not just individuals, performed it. In other words, when witnessing a group performing a mitzvah, we afford it special respect.
Based on this rule, it is quite understandable why the custom developed for the entire congregation to stand for tekiot. When the ba’al tokei’ah blows the shofar, the entire synagogue is fulfilling a mitzvah and thus, special kavod must be shown.
(Another reason why people stand is because they are fulfilling the mitzvah of blowing the shofar by hearing it, and the general rule is that one stands when performing a mitzvah.)