One can easily follow this all the way back to medieval Europe, at least in the Western world: early post-Roman European kings were just well-organized warlords, and for a very long time any idea of 'legitimate governance' was just a thin papering-over of the realpolitik involved in armies based on personal loyalty.