When the Muhajirun arrived in Madinah, the singles settled in a residence that was known to be for them, separate from the houses of those with families. Thus, singles would not settle among families. All of this was because mixing one group with the other would be a cause for fitnah, as mixing men with women is like mixing fire with wood.
[Al-Istiqamah, Ibn Taymiyyah (1/357)]