As a counter to this, I have seen multiple managers make jokes like this and they all came from nontechnical backgrounds and had 20+ years of experience. I literally had a (nontechnical) manager say in a supposedly joking manner once about going to some meeting “Well you want to put food on the table for your family don't you? So remember that you have to be there for <some not-that-important meeting> Ha ha ha”.
So the whole “it's just coders learning basic professionalism” narrative might not be as cut-and-dried as you think it is. One (unproven) hypothesis I have is that it's possible that people who went to college and had their first decade's worth of jobs in a comfortable economic climate are more comfortable making these kind of jokes than others who were not so fortunate.