They're standardised zeroconnf protocols. Apple was part of the early development.
Bonjour is the apple implementation for mDNS.
Avahi is the GPL compliant implementation.
mDNS, llmnr (ms developed), have been known for ages to be vulnerable.
https://en.m.wikipedia.org/wiki/Zero-configuration_networking#Standardization
*I don't like apple
https://duckduckgo.com/?q=mdns+vulnerability&t=fpas&ia=web
https://book.hacktricks.xyz/generic-methodologies-and-resources/pentesting-network/spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks