Up until that point I had thought my manager and I were friends; he did me a great service early in my career by revealing the truth about how organizations operate.
Well, establishing a relationship of respect and power is part of management, but there's absolutely no reason one needs to be a dick to do that.
Up until that point I had thought my manager and I were friends
That sucks, sorry to hear it. Maybe it's a sign of the times (I've only been in the industry about a year), or just the managers I've been fortunate to work under, but in my experience, coders always get more respect than to be bullshitted like that. It all comes down to money, I think:
If the company pays you less money than the wealth you generate, and provides good enough benefits/environment, you're playing a win/win game where everyone's happy. Yes, there are times when your interests diverge - your manager has a budget to minimize and you have a family to support, but those are exceptions to the rule.
Can't disagree more. If you're clueless about everything outside your job responsibilities, then I could see how that's true, but if you're at least moderately engaged with those you report to, you can certainly have friendships.
Nobody looks to screw anyone over - constantly ask hard and honest questions - if your boss says "if I were to ask your colleagues right now, you would be fired", ask "do you think it's something we can work out, or should we talk about my leaving the company?"
Be honest with your superiors, and demand they be honest with you.