The switch widget is for settings where flipping the switch takes immediate effect, unlike a checkbox where you have to press some "OK", "Submit" or "Apply" button. In Windows 2000/Office UIs, this would've been shown as a button that could visibly switch between "pressed" and "not pressed" states, just like a push-down switch, but that was rarely used. The modern labeled switch design is a lot more intuitive than that.
> The modern labeled switch design is a lot more intuitive than that.
In a lot of the modern switches I meet with the colour choice makes it totally unclear which is on and which is off.
Ok, if it's a cookie acceptance dialog it makes sense to do dark patterns, but I've seen it in legit apps too.