It’s not forcing anything actually but simply selecting a default value for the icon. If an app doesn’t register the extensions and icons itself properly and one manually associates any extension with an app using Open With, one ends up with:
HKEY_CLASSES_ROOT\.ext
having its (Default) value as “ext_auto_file” (where “ext_auto_file” = File Type)
HKEY_CLASSES_ROOT\ext_auto_file
having its (Default) value as “File Type Description String”
HKEY_CLASSES_ROOT\epub_auto_file\DefaultIcon
having its (Default) value as “Path to Icon File or Resource in EXE/DLL/etc.,Resource ID”
Now by default naturally Windows will select “Path to Program EXE,1” as the icon for whichever file type you associate with the EXE, simply because it has no other choice. Even if the EXE for example contains a 100 icons, how is Windows to know which icon resource ID it should associate with which extension? It also cannot randomly associate icons because that would be ridiculous, so it does the best it can. After that it is up to us to change the icons if we so please, and Windows doesn’t tamper with them in my experience unless you go about tinkering with the extension association again (perhaps use Open With again for the same ext).
Thus for example we can have:
[HKEY_CLASSES_ROOT\.epub]
@="epub_auto_file"
[HKEY_CLASSES_ROOT\epub_auto_file]
@="EPub Document"
[HKEY_CLASSES_ROOT\epub_auto_file\DefaultIcon]
@="C:\\Program Files\\SumatraPDF\\SumatraPDF.exe,1"
[HKEY_CLASSES_ROOT\epub_auto_file\shell\Open\Command]
@="\"C:\\Program Files\\SumatraPDF\\SumatraPDF.exe\" \"%1\" %*"
and
[HKEY_CLASSES_ROOT\.mobi]
@="mobi_auto_file"
[HKEY_CLASSES_ROOT\mobi_auto_file]
@="MOBI Document"
[HKEY_CLASSES_ROOT\mobi_auto_file\DefaultIcon]
@="D:\\My Icons\\Mobi.ico"
[HKEY_CLASSES_ROOT\mobi_auto_file\shell\Open\Command]
@="\"C:\\Program Files\\SumatraPDF\\SumatraPDF.exe\" \"%1\" %*"
Both file types associated with Sumatra, but with distinct icons. Once one has made the necessary registry edits either manually or with a GUI app such as NirSoft’s FileTypesMan, one can simply export the keys as .REG files and back them up along with the icon files, to be quickly reapplied whenever required (say after a reinstall or a fresh install).
P.S. If multiple extensions have the same File Type value then naturally they will share the same icon, description, open command etc.:
[HKEY_CLASSES_ROOT\.epub]
@="SumatraPDF"
[HKEY_CLASSES_ROOT\.mobi]
@="SumatraPDF"
[HKEY_CLASSES_ROOT\SumatraPDF]
@="SumatraPDF Document"
[HKEY_CLASSES_ROOT\SumatraPDF\DefaultIcon]
@="C:\\Program Files\\SumatraPDF\\SumatraPDF.exe,1"
[HKEY_CLASSES_ROOT\SumatraPDF\shell\Open\Command]
@="\"C:\\Program Files\\SumatraPDF\\SumatraPDF.exe\" \"%1\" %*"