Description of DO_DOMAIN_IDS is
"The DO_DOMAIN_IDS option for CHANGE MASTER can be used to configure a replication slave to only apply binary log events if the transaction's GTID is in a specific gtid_domain_id value"
The filter works after the replication handshake, which is counter intuitive.
It would more consisten, if the replication handshake respect DO_DOMAIN_IDS and
One possible usecase is, if a async slave is a slave from a galera node. slave_pos is
(, <server only gtid>)
After an SST the <server only gtid> is not anymore in the binlog, but still the <any wsrep gtid> .
This breaks replication. Repecting DO_DOMAIN_IDS in replication handshake can help here.