Child labor in the late 1800s

Why did children have to work hard? How did this affect the community?