I saw a talk at Kiwicon yonks ago where a guy broke a Cisco switch. The thing was crazy. The switch ran a Linux kernel, but the shell/system barely had anything except for once massive 500MB binary. If you ran ip a, it only showed one Ethernet adapter, because the binary connected to the PCI bus and the other adapters using user-mode PCIe (which is a thing).
He didn’t say it in the talk, but I think what happened was Cisco use to make their own OS. As time went on, it was just easier to use Linux since it supported like all the SoCs at the time .. so they’d use a tiny thin layer of Linux + shims to connect to the binary which use to be the entire OS, but is now just an iOS blob running on Linux.