- Organising the work and steering it in the right direction
- Ensuring that people work well together, help them grow, deal with "people problems"
If and when both of the above is achieved without a person holding the title "Manager", you don't need them.
This can be achieved by hiring 51%ers for example [1] and by actively monitoring the health of your organisation.
[1] https://news.ycombinator.com/item?id=39333921
[1-1] https://www.amazon.com/Setting-Table-Transforming-Hospitalit...
[*] YMMV: the hardest problem in any organisation is the "people" aspect, there's no silver bullet.
EDIT: Added the link to my other comment about 51%ers