Etymologically, derived from the word headman (or more accurately its German equivalent, hauptmann.) So called since the word entered usage as the commander or headman of a medieval mercenary unit.