For what reasons, SMBv1 can spontaneously turn off in Windows 7?

I use router to connect player through the LAN port to my PC via SMBv1.
After a day or two, the connection with the PC is turned off.
To turn it on again I need configure the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters

Registry entry: SMB1
REG_DWORD: 1 = Enabled

Perhaps some kind of solution to every day or two days not to do this?

Not sure it will help your case, and if Windows 7 is like Windows 10 in not enabling SMB1 by default then the following article may be useful. I used the commands in this link to configure my server PC to be accessible by my Shield and it worked great and stays exposed even after multiple days and reboots. Of course, your post is Win7 and my “solution” is Win10, so YMMV.

This issue began after I changed the router.
I’m wondering how the router can affect the OS, so that it turns off SMB.

Ah I see. Yeah, that is strange.

The reason for disabling the SMB turned out to be different time zones on a PC and a router.
It worked a week instead of a couple of days as before and the SMB is disabled again.
The second reason was the activation of the anti-virus for any threat.
I will think how to cope with another reason for disabling SMB.