Shutting down is not a single switch. The system asks every running program to save its work and close, waits for hardware drivers to park themselves, and only then cuts power. If any one of those steps never reports back, the whole sequence stalls.
That is why a shutdown can sit on a spinning circle for minutes. The system is being polite, giving a program time to finish. Usually the program has stopped responding entirely and will never answer.
Fast startup features complicate the picture. Instead of a true shutdown, the machine saves part of its state to disk so it can resume quickly. When that saved state is corrupt, the next shutdown inherits the same problem.
The distinction that matters is stall versus loop. A stall is a stuck program; a loop, where the machine restarts instead of powering off, usually points at a driver or power setting rather than an application.