Do you believe companies do a good job of helping developers make the transition to management?
Not in my experience.

What could be done better?
This somewhat depends upon the size/structure of the company and the layers of management. If possible have another experienced manager (NOT your line manager/director) as a mentor.