Sadly, talking during davening in shul is a major problem.
Lets say a shul has a few people who constantly talk loudly throughout davening and they disturb the other people and the rabbi. The rabbi, board, members and others in the shul asked them nicely many times to be quiet, but they still disturb everyone.
Everyone is extra annoyed with these members. They approach the rabbi and request him to expel these members from the shul. The rabbi says, "I know how much they disturb the davening, and it is difficult to concentrate and hear the davening and Torah reading with their loud talking. I would love to expel them from the shul, but, if we do that, the shul will lose a tremendous amount of money from them, to the point where we may have to close the shul in 3 months. And, you know that we can't exactly find other members to replace their funding, either or get the funds from the remaining members."
Halachically, does the needs of keeping the shul in existence take precedence and MUST they deal with these people disturbing everyone else's kavanah, or should they expel these talkers anyway because the sanctity of the shul and the need to daven with kavanah is more important?
Additional premises based on comments:
There are other shuls in the neighborhood. However, the majority of this shul's membership is comprised of elderly people who have limited walking range, and this shul is about the limit. If the shul closes, they will most likely not attend any shul at all, as the next closest shul is too far for them.
As I understand, there is a general rule to do everything possible to maintain a shul building in existence. The town has strict rules stating that a religious building must be sold only to another religious institution and cannot be sold for residential or commercial purposes. No other shul wants to buy the building, so if the shul closes, it will be sold, most likely, to a church or mosque. I understand that there may be a halacha to try to prevent this, but I may be wrong.