There is no risk (or negligible risk) of being offloaded.
There is a risk your bag will have to be stowed or put far away from you on the aircraft, which many people find irritating.
I think most people get impatient, nervous or anxious when they see the flight is close to boarding—and simply do not want to sit any more. Either they join a queue or make a queue, or they form into an unsightly mass as close as possible to the gate. If a small number of people do it, then everyone else begins to follow. It is some kind of instinct many people have.
Some people have rather unpleasant terms for this phenomenon ("gate lice" I have heard).