Your image viewer is editing registry keys to set itself as the file extension handler instead of using the correct way - the correct way is to register itself as a new handler so Windows prompts the user whether to change to the new program or not. Trying to make the change by editing registry keys is a pattern used by shady devs to hijack file extensions without user consent, and as s user defence Windows rejects the change and resets the file handlers to default.
https://devblogs.microsoft.com/oldnewthing/20170517-00/?p=96...