Linux can be easily and simply modified by anyone to suit their needs; Win98 cannot. You are comparing apples to oranges.
This has nothing to do with being open source or being customizable. It's simply pointing out how fast hw detection is not only possible but the norm on other systems.
PCI wasn't a given. Plug and play wasn't a given. You couldn't even reliably enumerate all hardware on a system.
Hardware detection back then involved a lot of poking at random IO ports and seeing what happens, using heuristics to select an appropriate driver. This is as dodgy as it sounds and would crash or hang your system if you weren't lucky.