Having grown up in Communist Bulgaria where queuing was effectively a rationing system, I've realised that queuing is the least efficient but most fair way to distribute a scarce resource. Why? Because people's ability to queue is probably the most uniformly distributed skill people can have - pretty much any age and most physical conditions will allow you to queue. Yet the amount of time wasted in a queue is huge.
The capitalist system moves rationing to money. Here fairness is largely non-existent (is a billionaire's contribution to society really worth however many nurses/teachers/policemen it would take to even the $$s), but the system is very very efficient.
So nowhere's perfect.....