The reason people specialize is that there are increasing returns to specialization, as Adam Smith pointed out many years ago.
Therefore, if you specialize, you'll be able to trade your time for more money/bread/whatever. If you want, you can do a little bit of programming and a little bit of ditch digging, and a little baking, and be terrible at all of them, and get paid consequently.
It's not some plot of the "corporate ruling class", whatever that is. Ordinary people diversify their investments as well, mostly via things like index funds, which can be had at very cheap prices.
Different concerns. Specialization is about accelerating (probably exponential) returns to skill growth.
I've had several experiences investing huge amounts of time and emotional energy into companies and projecots that didn't deserve it. Total loss. Skill growth and career advancement I can get behind. Unrequited loyalty means you piss away the only resource that actually matters: time.
Computing is highly specialized, but what we need to tackle that is a real profession. Professionals have ethical obligations that supersede managerial authority, and are both allowed and expected to devote half their time or more into career growth and continued learning, rather than dropping 40-50 hours on short-term, managed work. Are software engineers really professionals? I'd argue that, across the industry, the answer is a resounding "no". But it would be a better world if we were.