Technical skill and seniority does not translate into managerial aptitude. In fact, the better you are at your technical role right now, the worse off you will be as a manager. And it gets worse: If you are an awesome hacker, chances are you will not only suck at management, but you will also hate it with a passion.
Some of the core challenges:
The zone: Banned for life.
As a developer, you need long, undisturbed periods of time in order to concentrate on the problem at hand. Your best, most productive time is when you are in 'the zone'. Management time, by contrast, is highly fragmented, allowing little unbroken, focused time.
Feedback loops: Error 504, forever.
Seeking out short feedback loops is instinctive for developers. It is fundamental to our productivity and helps keep us in the zone. Management feedback, by contrast, is biased towards very long-running, indirect and actually most often, non-existant.
Communication: Nobody will understand a word you say.
Every time you have to communicateas a software developer, there is a standard which serves to strip away subjectivity, reduce the signal to noise ratio and improve the consistency and quality of the shared understanding of that information. UML, use cases, flow charts, DFDs, ER diagrams - even code itself. These are the standard tools of trade for a developer and we like the certainty they provide. Managers on the other hand have to deal with nuance, audience awareness, bias, sensitivities, personal context, etc etc etc - all the things that developers try to remove from their communication.
Decisions: Striving for average.
One of the most challenging aspects of moving from software development into management is that it involves a fundamental, religious shift in your personal values and motivation - from objectivity to subjectivity. One example of this is that as software developers, we strive constantly towards a commonly defined and accepted 'best' possible solution. In management, there is no such thing. By virtue of the fact that you're dealing with a group of people, you will always get a diverse set of responses to any decision you make. And the kicker is that if everyone likes a decision you've made, it's probably a mistake.