In general this exists in order to detect features of the target compiler, libraries, platform and etc. A lot of languages can get away with making assumptions, due to either having only one implementation/compiler, supporting very few platforms/architectures or being otherwise insensitive to the environment.