As far as managing lines of a few thousand people, I've seen many examples of everything functioning totally fine in the USA.
My point is more about who is in charge of enforcing the social norms. In the US, it is up to the people in line to enforce the norms with other people in line. In Japan, there is usually an 'authority figure' nearby. This person may have no legal authority (other than a store uniform) but people defer to them.
Huge lines can work well in any country. If they do, they are usually well attended by staff. An exception to this would be theme parks where extremely rigid pathways and geography of the line as well as distractions prevent any kind of disputes between line-waiters. Some US stores like Whole Foods use a single line and have staff/technology to help enforce fairness.
In Japan, even small lines of 3-5 people at banks or stores are well-attended by staff who have an eye for fairness. This small-line behavior then tends to leak into situations where there is no attendant staff.
Line-waiting behavior is one of the most fascinating things to look at when travelling. It teaches you a lot about your own culture. Other places where the culture caught me off guard were Russia, Italy, China and India.
It's easy to look at a video like this and attribute it to stereotypes of the behavior of crowds in different countries. I think the overlooked thing is that lines in Japan are very often actively managed. If a new line opens up, very often there is a person standing by the ropes guiding people to the new opening in a fair way. If the ropes are too long (causing you to go back and forth unnaturally) there is a peson there who removes them and creates a short-cut. Similarly, they will add ropes or move the line into a better position or manage a 'cut' in the line when it passes in front of a doorway or path (like in the video).
This puts you at ease since you know there is an authority figure watching out for fairness. Its no longer a "me first" attitude. It also trains people on how to behave when in a line. When that authority figure is not there, people still adopt the conventions of when they are.
In summary, this kind of behavior is taught and socialized into people because it's valued. In America (where I'm from) it is considered inefficent to have a person standing by a line telling people what to do. People are expected to self-manage. This also means when you're waiting on a line in Japan, you're not really thinking about the line very much. You're free to talk, read or daydream without worrying about your place in line.