If it helps think of the first author as the lead engineer or the CEO, and the last author as the board or the VC. In some areas of science (or some teams) the last author is closer to a CEO, in others closer to a VC (they almost always have the powers of the board). This picture does not contradict the guideline in the reference you shared. Typically, most of the work and writing of the paper is done by the first author, though sometimes, for example when a student gives up, only most of the writing of the paper. The main ideas may be from the first author or from the last author, and rarely in between, but the sorting typically goes by amount of labor/contributions on the task. In some narrow subfields, including most math, sorting is alphabetical or random.
That does help, thanks! Very intuitive analogy. Maybe this kind of organisational structure is a kind of natural archetype people gravitate towards when coming together to break new ground.