Master craftsmen paid apprentices almost next to nothing, and they were often contractually guaranteed to stick around for many years, so the teaching was a kind of wage and also a cost that could be recuperated later on. (The apprentice even often had to pay the craftsman to take them on.) None of those things are true for junior software engineers, who are paid to contribute and can leave at any moment. Also, yes apprentices often had to do chores. It is just not analogous at all.