One thing I never understood is why they board by group onto the bus. There's no advantage to getting on the bus first. Actually it's best to get on last, which minimizes time on the bus.
Undoubtedly the reason you're stuck standing there is they are paging the last passenger or two that has not boarded yet.
So, next time just wait until they say "final boarding call". And as others have mentioned, it's still better than a connection.