Just like great sports managers didn't have to be great players. Coding is one skill. Maximizing the happiness and productivity of the team is another. A manager should be able to write code and lead discussion on code. But having a great coder as an average manager is simply a bad decision on the part of upper management / leadership.