Hello,
If a device gets its IP address via DHCP (wifi probably, maybe eth also) and the DHCP request frame contains the name of the requestor dnsmasq will add it to its leases file and it will be able to answer with this name when asked. For devices with static addresses the solution is to add a pair ipaddr-name to /etc/hosts (and killall -HUP dnsmasq to force a re-read of the file).
rebind-protection = 0 is required if you want dnsmasq to be able to reply via any interface, the use-case is in the context of VPNs or private networks.
Regards,