Because why not. These kinds of things are just so Siri can press the button for you anyway.
It detects if you’re connected to the Internet by detecting your IP address. If it gets an address, it knows you’re connected and therefore Airplane Mode is inactive; it therefore turns it on. If it does not detect an IP address, it knows you’re not connected and therefore Airplane Mode is active; it therefore turns it off.
The obvious problem here is that this only works if you’re connected to Wi-Fi or cellular; if you’re in a dead zone and try this, it will leave Airplane Mode turned off. I have yet to come up with a foolproof workaround for this.