Boarding aeroplanes is a classic example of Queue Theory.
You can have the most effective method suggested by the Steffen Boarding Method which is very efficient but requires an essentially perfectly ordered queue of “standard” passengers to work. It just moves the point of interruption inside the terminal. This is actually safer but passengers find queueing in the terminal more of an irritation than queuing onboard.
If you allow passengers to be people and do what they think best suits them then inefficiencies result. There are those who rush on, those who lag and those who queue and grumble. The highly efficient mathematical models break down when faced the reality of the passenger list eg a frail passenger with a large carry on, or a family with young kids, or passengers who go past their allotted seat and need to go back against the flow.
A fair proportion of passengers have a ruse/routine which they think allows them to get on and off the plane faster than their peers which might work provided everybody else plays by the rules.