Apparently, GameCube Controller Support On The Switch Was An Accident
So as Reggie Fils-Aime explains it, Nintendo didn’t even have their own peripherals in mind when working on the 4.0.0 update. Instead, they were working on making the console play nice with third-party peripherals, specifically other types of headsets and the like. Whatever magical button they pressed to make this relationship a smooth one apparently had unintended consequences. Someone decided to plug in the GameCube controller peripheral and, surprise, it now also works on the console.