A lot of it is about government spending, government regulation, and personal freedoms.  Qatar spends a lots (and not on the military), moderate regulation is offset by the lack of taxes, and personal freedom are modest to low (dragging down the overall ranking).

Of course, what the index does not distinguish is how much of this is a result of the foreign-born populations' activities vs. those of the locals.  It would be hard to do, but it is something to consider.