Communal prayer has very ancient roots, derived from two complementary sources.
On the one hand, we know that from earliest times, whenever great trouble and suffering befell the community–warfare, plague, or drought–everyone would assemble together to pray, crying out to God
to deliver them from their distress.
As the prophet describes it, “Sanctify a fast, call a solemn assembly, gather the elders and all the inhabitants of the land into the house of the Lord your God, and cry unto the Lord” (Joel 1:14).
–Rabbi Adin Steinsaltz