Relayd and broadcast forwarding

I'm not looking for a solution as I'm fine with the way it is, but I'm rather interested in how relayd works.

I have LAN1 and LAN2 in my openwrt x86 VM, I get two WIFI SSIDs for connecting to different LANs with a Netgear R7800, with the interface option "unmanaged." Then I use another openwrt box to relay LAN1 with the help of relayd, and the upstream/wwan interface option is DHCP client, so as far as the extender's concerned LAN2 doesn't exist although LAN2 is routable through the openwrt x86 VM.

The broadcast forwarding feature is enabled in relayd configurations as I'd like to use DLNA and Chromecast in LAN1 across these two sites, but when I tried to use DLNA and Chromecast when connected to the extender SSID relayed to LAN1, I was presented with smart speakers connected to LAN2, which is my IoT devices LAN that I hope to manage separately, this doesn't happen when my phone's connected to the main AP's LAN1 SSID so I'm guessing relayd is doing something "clever" since that broadcast forwarding feature was enabled.

My question is, how is relayd able to do that, like the boundary of broadcast domain doesn't exist?