Should they code often in the week and write code which ships into production? Well, only if they have the time to do so and no more important managing tasks to do (in other words, yet it happens in small teams, but stops to be true as soon as the team scales)
But it the question is: should managers try to stay close to the code, in the sense of still be able to understand the ins and outs of what their engineers are talking about: then yes, it’s a great asset which makes them better managers, because they are in a better position to bridge the gap between the business needs, the higher-level needs (and constraints) and their team needs and capacity.
The best frontline eng managers in the world are the ones that are never more than 2-3 years removed from hands-on work, full time down in the trenches. The best individual contributors are the ones who have done time in management.
This is a quote (I agree 200% with this!) from Charity Majors’ posts on that topic. I think I already shared them a few weeks ago, but this is a great opportunity to share them again: Charity Majors (engineer/CEO at Honeycomb) wrote two awesome blog posts on engineering management , which are, IMHO, must read for any engineer exploring the management in some way (either "real" management, or lead engineer, which also involves a lot of human management) This is focused on management from a former engineer standpoint (which is not every manager) but it makes a lot of great points.
The Engineer/Manager Pendulum (2017 May 11) and the sequel: Engineering Management: The Pendulum Or The Ladder (2019 Jan 04)
Hope you’ll find those links useful.