QR, EY, EK are actually VERY price competitive on their routes. They're mainly transit airlines, but to fly from e.g. random US to Australia, it's probably cheaper to go via the middle east on one of those carriers vs. over the Pacific. There are a lot of political concerns in places like Canada that the middle eastern airlines are dropping prices so low on profitable long-haul routes that the national flag carriers can't compete.
As to why they are better, it's probably that they focus on the inherently profitable long haul high capacity high frequency market, have little or no "legacy" costs (US carriers paying pensions and healthcare for retirees), supportive governments (for things like expanding their hub/transit airports to accommodate more flights). Allegedly they are not massively subsidized by the foreign governments.