Windows 7 and Windows Server 2008 R2 both are 6.1 build 7600, for example.
Also, suppose you check the version for compatibility checking, what do you do if you get a version that you don’t know about, say “6.4, build 7709”? You can give up and declare your program doesn’t work with this version, but that may lead to lots of support calls when Microsoft rolls out a service pack. So, instead, programs try to guess from the version string what OS they run on.
Windows 7 and Windows Server 2008 R2 both are 6.1 build 7600, for example.
Also, suppose you check the version for compatibility checking, what do you do if you get a version that you don’t know about, say “6.4, build 7709”? You can give up and declare your program doesn’t work with this version, but that may lead to lots of support calls when Microsoft rolls out a service pack. So, instead, programs try to guess from the version string what OS they run on.
And yes, ideally, programs check for features (https://docs.microsoft.com/en-us/windows/win32/sysinfo/opera...). Unfortunately the world isn’t perfect.