There are many different system files that Windows needs in order to function. These files are often updated using Windows Update to add new features, fix bugs, patch security issues, and more.
Windows is unable to replace these files while they’re in use. This is for numerous reasons, both technical and practical.
If an update specifies that file X needs to be replaced, and file X is being used by a critical system process, then we have an issue. Closing the critical process would cause Windows to stop working, which is obviously unacceptable behaviour. There’s no way to switch the old version of file X with the new one while the critical process is running, but Windows needs that process.
The only way to safely stop the critical process is to restart Windows. Updates can either be applied before or after you restart. Windows will ensure that the critical process isn’t running yet, replace file X, and then start up normally. Windows can’t start up properly until the new version of file X is in place, so you can’t use Windows while it’s updating.
Not all updates require a restart. Windows Vista introduced a feature that allows system files to be replaced while the system is running under certain conditions. If an update replaces a non-critical file, or a file your computer isn’t using, it’s not necessary to restart.
Unix-based systems like macOS and Linux don’t need to reboot as often, due to the way they handle loading files. In short, Unix systems load critical files in memory and don’t depend on the version on the hard drive, while Windows depends on the files on the hard drive staying the same. If a critical file on Linux needs to be updated, the system will simply swap the old version with the new one while running. Currently running processes will use the old version, but new processes will use the new file. Replacing certain files still requires rebooting. This does, however, pose a security risk, and rebooting to ensure the new files are loaded is still recommended, even if it’s not technically required.