Pretty much every effective military in history has had this kind of hierarchical structure, by both imitation and convergent evolution. I'm sure there's a post on https://acoup.blog/ about it.
I will checkout this blog, maybe it has some posts about non-military initiatives also.
[1] https://en.wikipedia.org/wiki/Category:United_States_Army_Co...