Apparently the 'Control Panel' WiFi switch does not actually turn off WiFi as you would intuitively expect. It only disconnects from whatever 'remembered' network you are currently on.
So let's say you have a remembered network for both your home and work, and let's say you are at work and 'disconnect' WiFi at work through the control menu (not settings), it will remain 'on' in the background. Then when you get home and it recognizes your home network, WiFi 'connects' to your home network as it assumes you probably want your WiFi on at home. Or any other 'known' network for that matter. (This is the auto-join feature).
To turn off WiFi (completely), you need to do so throught the settings menu.
I can see the appeal, but I believe it is a feature that should be the other way around. The control panel should turn off completely any form of connectivity (just like the settings toggle) like WiFi, Bluetooth and (please add) cellular at an instance as the users knows very well why they don't want WiFi, Bluetooth or cellular turned on. So respect that and have it turned off no matter where one arrives or leaves. (Navigating a settings menu for connectivity feel archaic in 2024).
Then if you want WiFi, Bluetooth or cellular to come on when you leave a particular place or arrive at a particular place (network), then that is usually more of a 'behavioural' and therefore a more 'set in stone' preference that can be fine tuned in the settings menu.
It is apparent that the control panel toggles do not behave as the user intuitively would expect, and that is what Apple was and should remain all about. Again, not disagreeing with the feature, but I think it should be implemented differently, as described above.