In George Makdisi’s The Rise of Colleges, Makdisi details in the beginning of the book how the original style of teaching from the time of the Prophet (may Allah bless him and grant him peace) evolved due to numerous factors into first a masjid/khan combination (khans being dormitories/guesthouses that housed both students who studied in the adjacent masjid and travelers) and then into full-scale madrasahs/colleges that both provided a classroom setting as well as housing.
What caused this progression from the masjid to the madrasah? Makdisi suggests that the most plausible reason is the development of the waqf system, which allowed the madrasah to support the finances of the students.
The fact that madrasahs didn’t develop until the fifth century suggests that the endowment system for centers of learning didn’t solidify until this time as well. What begs attention here is that since madrasahs evolved due to the availability of financial resources (besides the obvious independence from masjid governance), it would seem very much in line with our original educational methodology to revert to the masjid-college or masjid/khan system due to our present-day financial restrictions.
See pg. 9-34, Makdisi, George. The Rise of Colleges.