Unlock phone to toggle wifi?
This is just the way Samsung chose to implement it... The quick toggle panel on most stock Android or near-stock devices is accessible without unlocking the device, although anything other than a toggle, such as selecting a different WiFi network, requires unlocking.

You would need to flash a custom ROM in order to get the desired result due to Samsung's customizations being so non-standard.