My kids work in team projects at school. The issue is that many other pupils just want to work the least possible and procrastinate as much as possible. This drives my kids crazy because they want to have good scores and they much prefer having a nice evening playing games or watching TV instead of rushing for late homework. (note to other parents: my kids do procrastinate, of course, but not as much as the average :-) )
It's the same in university (except maybe top ones). Most people want to do the bare minimum, such that in CS if you're competent it's often faster to do the whole project yourself than try to motivate/coerce/guide everyone in the group into producing a decent piece of work. Then this habit carries over into the working life; "if you want something done well, you've got to do it yourself".
that was my experience in school as well - and the real killer was even when team members contributed exactly zero effort for team projects, everyone on the team got the same grade. Professors didn't care - even if 3/4 team reported that 1/4 contributed zero.
It doesn't take many experiences like that to decide it's easier to stay an 'individual contributor' when in the workplace, or at a bare-minimum, be very careful about what teams you get assigned to.
What is to stop the 3/4 who didn't do anything will rate the person who did everything as a jerk, and he will be fired. It is 3 voices against 1, the manager will take their side in most cases.
Team work projects in an university should be marked through the components each individual does. In the real world, lack of effort = fired, in an undergraduate, one low grade which people are OK with.
Nothing made my kids hate working with other people more than group projects at school. The projects were, without fail, a total disaster every single time.
Deliberately setting someone up to fail while telling them they are going to be responsible for the failure you planned is not a good teaching method.
If you want to teach people how to cope with bad teammates, you should actually provide techniques and strategies to deal with that.
None of my group projects in school came with any instructions on how to work in groups. Surprisingly, I didn’t learn anything other than resentment and distrust.
I had to learn that skill on the job, without any guidance.
I'm curious to know what specific lesson 'this' refers to, but hey, if we're tossing around hypotheticals: maybe the teacher was just lazy and/or crummy.