you echoed my thoughts pretty well. i've worked in software engineering since 1984, and been on quite a few teams in large corporations and startups. i like to observe teams and i'm curious as to why teams succeed and fail. i've observed quite a few characteristics that contribute towards success and the ones that fail are obvious within the first 10 days of working on the team. i can sum it up this way though. in every successful team, there are 2 or 3 people that are the leaders of the team (whether small or large) that set the tone for everything. i've watched these people move into areas where they are not domain experts and they become domain experts. after observing these successful people, they are unique in that just about everything they work on is a success. they draw other talented people towards their work, the success feeds on itself. its similar to when we want to take a class because of the teacher, or join a team because of the coach.
in the end software is really hard, software releases are harder, running a software organization is 10 times the art that software programming is. there are lots and lots of books with information on failures and success. its hard to repeat success even when attempting to do all the right things, as there truly is an art in the terms of how teams interact with each other, how priorities are made, when they are made, why they are made.
i think the best way for people to learn how to manage software teams is to mentor under successful people. people that have repeatable successes.