Often when the YMA builds Masjids, additional needs of the community are also looked at.
The YMA ensures that there is an Imam and teacher appointed to lead prayers and teach the community.
To facilitate this, the YMA builds a lodging for the Imam and, if a school is to be included, then also the lodgings for the teachers and possibly even a dormitory for students who live at a distance.
These building are not always considered by donors when wishing to build a Masjid and as such, the YMA would need to do additional fundraising to cover these hidden costs.
These buildings are simple and inexpensive and due to them being instrumental in housing the Imam and teachers for teaching the Quran to children, people are usually quite eager to share in the rewards.