The Zakat al-Fitr is distributed to the eight categories mentioned in the verse of Surah At-Tawbah, according to the opinion of the Hanafi school of law, along with the majority of scholars.
It is distributed to the poor and needy rather than the other categories, according to the opinion of the Maliki School of law and some Hanbali scholars.
Therefore, it is not appropriate to include the feeding of people in the mosque as one of the categories for distributing Zakat al-Fitr, because some of those who attend the mosques may be wealthy or not deserving of Zakat.
Furthermore, the philosophy of Zakat is based on ownership transfer, which involves the transfer of wealth from one hand to another. On the other hand, communal feeding is based on sharing and collective participation.
And Allah knows best.
Fatwa by Dr. Khālid Naṣr