I don't know specifically what Samsung does, but a lot of OEMs who offer similar features licensed tech from a company called Tempow. Tempow offered its own BT stack and profile called Tempow Audio Profile (TAP) that enabled streaming audio to multiple Bluetooth audio outputs simultaneously. Motorola and TCL deployed phones with this tech.
I don't know exactly, but my educated guess is that they form multiple normal Bluetooth audio connections to multiple devices. The standard allows this and the bandwidth should be fine too, so I suppose they just added a little bit of software to control it.
BTW, Google acquired Tempow last year: https://www.protocol.com/entertainment/google-synaptics-temp...