What Exactly Happens When You Shut Down or Sign Out of Windows?
Windows does a lot of work in the background when you shut down, restart, or sign out of your PC. The process ensures all your work and application data is saved before the hardware powers off.
Source: howtogeek.com