I believe the answer is: Factories often needed fewer workers.
When we had automation, the production method would be heavily relied on machineries since it's far cost efficient and productive.
When this happen, factories would need fewer workers and this would lead to an increase in country's unemployment.