Exactly. I see so many people complaining about the Linux kernel SLOC versus other kernels; it's an unfair comparison because no other modern kernel I know of has such a wide selection of in-tree drivers.
For instance, when I install Windows on a computer, I will often have to install additional chipset drivers (odd USB3.0 controller, motherboard chipset stuff, fan control).
When I install Linux, all of that stuff works out of the box, no drivers necessary: it's rolled right into the kernel.
To be fair, most of that is in device drivers and other optionally compiled or non-critical pieces of code.
The common code path is extremely well tested and audited.