For this analogy to work, it also needs to include the professor advertising their course and attracting good-will primarily on the basis of their generous policy, and then bait-and-switching involved participants when they later decided they didn't like it.
The professor could advertise their course this way for Term 1, realize their policy isn't working as intended, and then change their policy (and advertising) as of Term 2. That's not a bait and switch. There was no promise that their course would have the generous original policy in for all terms in perpetuity.
As far as I can tell, you are allowed to fork HashiCorp's code up until the point of license change, and continue to use it as you like, rebrand it as a new project, whatever. I could be wrong, but I don't think HashiCorp ever said "we will never ever change our license."