Our Gemara on Amud Aleph in a discussion about keeping records and histories of gravesites, said that one must ask the local elder or Talmid Chacham for information. The Gemara says we see from here that it is incumbent upon a rabbinic scholar to take responsibility for matters pertaining to the city and community.
Some additional scriptural supports for this idea comes from the verses that discuss the Egla Arufa ritual performed when an unidentified corpse is discovered:
וְנִגְּשׁ֣וּ הַכֹּהֲנִים֮ בְּנֵ֣י לֵוִי֒ כִּ֣י בָ֗ם בָּחַ֞ר הֹ אֱלֹהֶ֙יךָ֙ לְשָׁ֣רְת֔וֹ וּלְבָרֵ֖ךְ בְּשֵׁ֣ם הֹ וְעַל־פִּיהֶ֥ם יִהְיֶ֖ה כׇּל־רִ֥יב וְכׇל־נָֽגַע׃
The priests, sons of Levi, shall come forward; for the LORD your God has chosen them to minister to Him and to pronounce blessing in the name of the LORD, and every lawsuit and every affliction is subject to their ruling. (Devarim 21:5)
Haamek Davar quotes our Gemara in relation to these cohanim who are held accountable and responsible when a tragedy strikes such as a murder, and also notes that the verse says they are accountable for every quarrel and affliction.
Seforno on the verses that describe the Tribe of Yissachar as carrying the burden like a donkey also quotes our Gemara (Bereishis 49:15):
ויט שכמו לסבול, he accepted two kinds of burdens, the yoke of Torah and the yoke of public service. This reflects what our sages have said in Moed Katan 6 that young Torah scholars have to accept the burdens of their entire town upon themselves.
Tosafos (“MiTerumas”) tries to understand how they were able to use money that was collected for sacrifices in the Bais HaMikdash to pay for the workers who went patrolling the fields and uprooting Kilayim (forbidden mixtures of other produce). Tosafos resorts to a principle used in other areas in Shas known as Lev Beis Din Masneh Aleyhu. Essentially this means that the rabbis either created or worked off the assumption that the money was originally donated with an implied condition that it could be used for other communal needs as well.
I wonder about the etymology of the term, Lev Beis Din Masneh. Literally it means “the heart of Beis Din makes a condition”. It is an odd phrase. If anything it should be the heart of the people. Or just Beis Din Masneh. However, it seems this is not about what people have in mind but more about Beis Din’s concern for the common good, hence Lev Beis Din, the heart of Beis Din. I think Rashi is trying to make this exact point when he says (Shavuous 11a, “lev”) : וכל מידי דציבור נותנין ב"ד לב: Beis Din takes to heart any matter that is of public welfare. Rashi in Zevachim (6b, “lev”) says something similar, that those who are involved in communal affairs make a condition in the funds collected.
I would like to think the phrase of Lev Beis Din stems from the genuine concern that the leaders have for the communal well being. Thus even though it is a legal term, the authority stems from the deep interest in the community and thus their assumptions are accepted and enacted.