#pragma is nonstandard. It is more for individual use.
If you are referring to the code pasted when you stated that they need not to check if _USE_MATH_DEFINES, it is indeed necessary. Note that they don't check for the define to avoid duplication. They are checking for the define to determine whether the following macros should be added to the translation unit. In addition, they include a formal define they use for whatever later purposes.