Does AirPlay online stream to Apple TV still go through the iPad?
If you stream a video from the internet, and then AirPlay is to a suitable receiver like an Apple TV, then all the devices in the chain still take part. The Apple TV doesn't simply get the stream location and other data like playback location, then stream it by itself, it get's a secondary copy that the iPad is essentially repeating onwards.
You can easily test this by streaming something, then airplaying it to the AppleTV, then turning airplane mode on the iPad - the Apple TV stream should fail.
AirPlay works as follows: there is no handoff, the iPad pushes data to AppleTV the entire time AirPlay is engaged.
iOS will connect to AirPlay receivers and offer to mirror the screen. If the application that you run is programmed to do other things, it can then send different content to the TV, continue to mirror and do things like play in the background. If the app you use is simple or doesn't implement Apple's more advanced AirPlay features, then you will get the default mirror behavior without the app maker needing to take any step whatsoever.