The idea that professionals should deal with community needs is a very modern one.
In olden times, all community affairs were taken care of by laymen – often, the best people in the community.
They did this work “for the sake of Heaven,” because everyone believed it was important, and that such work shouldn’t be done in return for any kind of honor or remuneration.
There is a Talmudic story that expresses this (Horayot 10a-b):
A certain leader in Eretz Yisrael wanted to appoint two other sages to public posts.
They refused, saying it is not proper to be rulers over others.
He replied: “You think I’m giving you authority? It’s servitude I’m giving you!”
Indeed, many rabbis used to sign their letters: “I am so-and-so, the servant of God’s servants in this community.”
–Rabbi Adin Steinsaltz