It's not just like that on Windows, it's also similar on Linux and Apples Mac OS. From the file extension, the operating system knows how to handle the file. The file extension governs how the respective file is to be interpreted, so that the information stored can be visually, or acoustically displayed or reproduced.
2.) The executable file extensions and file extensions!
However, there are several programs and services that also use extension to be recognized as such. Usually, or more commonly, it is the EXE file, formerly MS-DOS, now for Microsoft Windows.
Today's operating systems use the file extensions (file type) to assign the program to which a file type should be opened. The file format is then read and interpreted by the respective applications, on Windows, MAC, Linux and also on Android smartphones and iOS on iPhones.
3.) What should I pay attention to file extensions and file suffix?
Changing the file extension does not damage the file, but it is misassigned or recognized by the system, here is an example when changing the JPG file extension to EXE.