Way to start with a false premise. The meme died out by now[1].
> The phrase “Learn to Code” was initially posted on Twitter after the layoffs at BuzzFeed and the Huffington Post.
Way to continue with a false premise.
The phrase was used literally [2], and the subject was referenced [3] by numerous newspapers and other media outlets back when the economy was tanking, as a helpful suggestion to laid off workers - miners, autoworkers, and so on. "Those jobs aren't coming back" and all that. The only concern back then was of practicality, and nobody in their right mind considered it to be a put down of the workes, or of programmers.
Yes, the phrase may seem insensitive from our, programmer's, POV. Nonetheless, there's a historical precedent to it, based off of much wider segment of society than just programmers.
I find it shameful that Twitter, in its infinite wisdom, decided to suppress the accompanying hashtag, and later on even went as far started penalizing the posters. It used to be understood as a good idea back then, it's still considered a good idea now-a-day. I think it was shot down only for the expediency of keeping the journalists a-buzz on Twitter.
--
[1] https://trends.google.com/trends/explore?date=today%203-m&q=...
[2] https://www.buzzfeednews.com/article/katienotopoulos/should-...
[3] https://gigaom.com/2014/04/09/michael-bloomberg-you-cant-tea... and https://www.wired.com/2015/11/can-you-teach-a-coal-miner-to-...