Mosque becomes a powerful and practical implementation of "love thy neighbors" commandment. In the time of the Prophet, mosque was the central place of social welfare, activism and care giving to those who were in need.
The Prophet (Sallallahu Alaihi wa Sallam) said: The dearest to Allah is the one who is most beneficial to people. The dearest deed to Allah is bringing happiness to a Muslim, or dispelling a grief from him, or settling his debt, or feeding him while he is hungry. It is dearer to me to support my Muslim brother to satisfy need than to make one month I'tikaf in the mosque. Whoever controls his anger Allah will cover his faults. And whoever goes out with a Muslim till fulfilling his necessity, Allah will make his feet stable on the Day while feats slip. [ al-Tabrani , Sheikh al-Albani graded it as Hasan in Saheeh al-Jania]