A running device holds an enormous amount of temporary state: memory allocations, network leases, open files and half-finished operations. Most faults you meet day to day are not broken parts but this state getting into a combination the software never expected.
Restarting discards all of it and rebuilds from a known-good starting point. That is why it fixes so many unrelated-looking symptoms — a printer that has vanished, audio with no sound, a network adapter that will not reconnect.
Order matters when several devices are involved. Restarting the router before the laptop lets the laptop request a fresh address from a router that is already ready, instead of clinging to a stale one.
It also tells you something when it does not work. A fault that survives a restart is usually configuration, hardware or an external service — and that is genuinely useful information, not a wasted step.