The primary reason for such dense population in mill towns during industrialization was the exceptional amount of employment opportunities they offered.
Employment Opportunities
The amount of employment is because mills took a lot of workers, though not necessarily skilled.
The number of people drawn to mill towns led to the creation of cities particularly for industrial purposes.
Employment opportunity also opened up to women, and gave them a new position of financial importance in the family.
As you can see here, factories required a great amount of laborers