Chromecast works differently. Casting something causes the receiving device to load a web app that then plays whatever you were playing. Yes, that tiny thing actually runs a cut-down version of Chrome OS. In other words, it's not merely an audio/video streaming protocol. Your phone/computer acts as a remote, and it's the Chromecast itself that does the streaming.
That's only for apps that support doing that, though, like Netflix, YouTube, Spotify, Twitch, etc. If you're casting a game or something that's local content, then it will obviously still stream it directly.