If you are self-motivated and intelligent enough to learn the equivalent of a CS degree on your own, then the upper bound on your career trajectory is often significantly higher than "senior software engineer".
So even if you can self-learn, the article is still bad advice. Better advice would be "if you can learn this on your own, maybe aim higher than code monkey jobs".
Go ahead and major in CS because it'll be easy and enjoyable and a good fallback. But also pick up a second major in pre-med/pre-law/econ/finance/engineering/etc. Or get involved in research projects, etc.
So, yes, this is bad advice for weak students. But it's also often bad advice for strong students, who should be aiming high.