A manager needs to jump in from time to time, however they should resist the idea that "it would take less time to do it myself than explain how I want it done to someone else". That idea is common in inexperienced managers.
Lets say that a team of 12 need to work with libfoo, a library that is notoriously difficult to use. You, as the manager realize that the team will only be using 1/8 of what the library provides, so it makes sense to write a wrapper to make that part easier to work with.
You explain this to some members of the team, after two or three tries its still not what you imagined .. at that point you need to jump in and make adjustments.
Meanwhile, while you are writing this yourself, you tend to spend less time reviewing commits to other parts of the project and fall behind on your reports, budget and other managerial duties. So, you have to realize, every time your doing the job of a programmer, the project has a part time manager.
In the grand scheme of things it makes sense to identify the brightest and most experienced member of your team and make them your tool for such things. Ideally, this someone is an individual who could easily do your job but doesn't want it, they exist in nearly every team. If you can identify (and identify with) this person, you will only need to jump in when they get stuck, which should not be often at all.
Moreover, if you manage your projects well, you will spend as much time teaching as you do managing. If you do that well, you will seldom be confronted with situations that require you to reconcile misunderstandings with your own code.