For Netflix what happens is your browser tells the cast device what URL to go to to play the content. Your browser does not need to steam the video to the cast device. It can fall back to that so you can cast anything, however.
You cannot simply go near a Cast-enabled device and start playing your stuff, unless I am mistaken. If that is the functionality then that would be terrifying as I would be handing my credentials to this Cast-enabled device.
There's no need for a plain username+password to be used... it's just an authentication token as the resource or part of the url.
I don't know why it's a terrifying concept either.
Anyway, Chromecasts can be configured to allow guest access at the device level. Phones that are even on distinct networks can still guest-Chromecast via ultrasonic noises emitted by the Chromecast. It's pretty nifty. It's nice to have a bunch of people over and have a shared YouTube queue. For more details (https://support.google.com/chromecast/answer/6109297?hl=en) expand the section "How do mobile devices connect with a Chromecast in guest mode?".
Only app I know for sure it works is Youtube. I'm not sure what other app handles it, maybe GPM and Spotify.
That's a fallback method, but the expected methods for most sources is that the you send the Google Cast receiver (chromecast, etc) a URL for the media, and it goes and streams it directly.