For the vast majority of history people did whatever work their circumstances led them to do. Such as taking over their father's farm, their father's craft, or whatever apprentice job there was a vacancy for nearby and hopefully learned to like it though exposure.
It has also been argued that the first farmers were also miserable, but still won due to more calories. But they would have preferred the hunter gatherer lifestyle over working one field all the time and taking care of a bunch or domesticated animals.
Yes there is something sad about a master craftsman having to become a manager in a factory, and the apprentice a conveyor belt worker, but the industrial transition also allowed immense improve ts in efficiency and production. Many people who descend from those early factory workers and farmers, like myself, enjoy a casual level of abundance with a desk job, car, stocked supermarkets, online orders etc. and while poverty still exists it's nothing like it was 100-150 years ago.