Why did labor unions form during the Industrial Revolution?

to prevent workers from going on strike
to seek safer conditions in the workplace
to decide the responsibilities of skilled workers
to stop factory workers from taking skilled jobs