Answer :
"the shift from an agricultural economy to an industrial economy" was the biggest factor in the formation of unions. Factory conditions were much more dangerous than those of the farm, and protection against exploitation was needed.
The answer is: the shift from an agricultural economy to an industrial economy
At that time, the confederates rely on agricultural sectors as the largest source of income while the union states rely on manufacturing supported by technological invention as their main source of income.
As the economy shifted from agricultural economy to an industrial economy, more states become more reliant to the union states. This influence them to join the union memberships in the late 19th century and early 20th century.