A rag to wrap around the face, especially the mouth and nose during a sandstorm, has been a good idea for thousands of years.
It's just that here in the free world we have been using bandanas and neckerchiefs because for the most part we have hats.
Our US government should have been smarter and given our troops bandanas of brown and tan for use over there, as it was apparently most soldiers bought locally which of course meant Shemaghs.
Probably is a good idea to skip the classic red bandana, but something like this (maybe with the patterned part being tan or very dark green) would have been a good idea
It's my understanding that the patterns on the Shemaghs are culturally significant, different patterns for different clans/regions/groups, so I am sure there were some times when locals were pissed off when the troops were wearing THEIR pattern when clearly not one of THEM. The 'classic western' bandana pattern would then be a boon.