When swiping down the notification bar on Android, you are receiving a selection of buttons which offer you quick access to toggle various functionalities of the phone like turn on/off wifi, toggle sound/vibration or toggle the mobile internet connection.
The notification bar can be swiped down if the phone is locked and unlocked alike, but when trying to toggle wifi in the locked stage, you have to unlock the phone before the toggle works. This does not apply to similar function like the mobile internet connection.
What might be a reason for this design decision? Swiping down and touching a button is usually done consiously and the chances to do these actions accidently are very low, therefore I do not think that this was done to "protect the user from themselves".