I had about 20 Windows XP workstations under my care... they would blue-screen when you needed them most, right before you printed the document you were done with.
It turned out to be the HP printer drivers... well actually the optimizing compiler used to create the HP Printer Drivers.... it decided that the floating point emulation could be unloaded once it was idle... but page layout (for print preview) used floating point, thus triggered the blue screens.
Once I figured that out (after a year+ hunt)... it got really, REALLY reliable.
It's code running at kernel level, it has access to nearly everything, it's very unlikely there's a place a check could have been added. Later Windows editions would significantly reduce access to kernel level.
Microkernels - which would have stopped any such crashes in the first place - were a popular idea in the 90s (due to a revival I'd say), but weren't very performant and in practice servers and desktops were made reliable enough without them. Google's Fuchsia is a modern example thereof.
Most device drivers are just shuffling data back and forth according to some protocol. The actual user facing logic can be outside the kernel. This is why I like openbsd. Simple subsystems to provide a common interface for some drivers, then a controlling program/library for actual usage.
It turned out to be the HP printer drivers... well actually the optimizing compiler used to create the HP Printer Drivers.... it decided that the floating point emulation could be unloaded once it was idle... but page layout (for print preview) used floating point, thus triggered the blue screens.
Once I figured that out (after a year+ hunt)... it got really, REALLY reliable.