It is a bit callous to be fair. Job retraining is costly and the way it was said more comes off as blaming the person for not knowing any better (people who've been working in that field for decades and started before the 90's). Predictions that people could not have reasonably made given the information they had at the time even if obvious in hindsight. There's also plenty of historical examples where rapid industry shifts result in a lot of people being out of jobs and entering poverty even if the total economy turns out better or smooths out in the long run. Temporally local events still matter and you can't just point to long historical trends to say the people suffering now aren't a problem.
Plus, we all know code bootcamps don't make great programmers. And if we're being extra honest, LLMs have a good chance of replacing low quality coders, so now in hindsight the advice comes off as even more pejorative and low quality. Hindsight is always 20/20.