I do not see much use of this, if you want a display buy a display, why buy 2 macs and use 1 just as a display.
The only way I see this useful is if you had an older computer and bought a new one, you can use the other one as a an extra display.
Here's an example use case: be me. Most of the time, I prefer working on a single MacBook display, because that way, I have the same setup wherever I am.
However, as a developer, I sometimes have to implement and test multi-display functionality. Other times, I have to test stuff on future macOS versions that I'm not using on my main work Mac yet. A second Mac — say, a base-configuration M1 iMac — connected either via AirPlay or Universal Control, depending on what I'm trying to do at the moment, can serve both of those purposes. Better yet, I can switch between those two scenarios on the fly. That means I get away with having one fewer device on my desk. That's a tempting prospect, because I don't like clutter.
And if you're the superficial type like me, who prefers the look of Apple devices over, say, the plasticky look of Ultrafine displays, there's a bonus: By using an iMac via AirPlay, I get a nice Apple-designed external display (of sorts) without having to shell out $$$ for the XDR display.
Long story short, by introducing AirPlay for Mac, Apple just sold an iMac to me. I get that this isn't for everyone, but for me, this is the best new macOS feature in years, and it works even better for me than target display mode would.