It's not that they are useless, it's that there are often too many of them.
At a previous SV org I worked for, they had roughly 1 "dev manager" for every 4 engineers. You could have 1 for every 10 and achieve the same result.
I’m not sure if that’s true. 1 dev manager for 10 engineers might be tough. The sheer number of 1:1s would be insane, much less keeping track of the career trajectory of 10 different people at 10 different parts of their lives. I guess this would be less difficult if everyone was already at senior or staff level, but you’d still have so much of that managers time sucked into 1:1s, reviews, and team retrospectives. I’m not even a manager and I start to feel neglected as an engineer once my manager juggles more than 6 other people, because I see they start to forget what I’m working on, and those 6 start to compete for attention to get promotions…
I think it can go either way (and at Meta, I have no idea), but team size tells you nothing. You can have a team of 4 highly productive engineers working on a specific project with limited scope and 1 manager can manage that very effectively. But you can't have that manager manage two teams, you're literally just splitting their focus (and with 4 people the manager can be hands-on). On the other hand you have plenty of teams that were at one point 4 productive people, grew to a team of 10, now the manage is very productive! Managing a team of 10 people, but in reality that team of 10 is now struggling to work efficiently and are probably producing the same value as the previous team of 4. The management structure is entirely determined by the underlying scope of the work that needs to be done - and yes, very often it goes astray, but in every direction.
You are right about team size, but in many companies, the "dev manager" is certainly not hands on, even with small teams. The last team I was on, the "dev manager" never even set up his development environment. He always claimed he wanted to get more involved, but probably had too many other priorities. If you are managing a team of 4, not making any technical decisions, not writing any code either, in my opinion, it is a bad sign. You are too out of touch. Hands on is necessary with small teams.
In those environments, all the technical work and decisions are delegated to a tech lead / staff / principal eng. The "dev manager" is there for people management and high level sprint planning. Planning can be done with very little technical knowledge since the team itself does the sizing and scoping.
Obviously not every company is the same, but that was my experience at a mid-size SV tech company.