I always knew that the router would provide the IP address, but I never realized that it also gives the name?
E.g. on my network I can access arduino.local. I cant imagine the router "magically" choose that name. So how does that work?
Well I don't have the brand name of the model, so I'm speculating based on the information.
The magical name (when in stand alone mode) comes into being via a relatively new protocol named Zeroconf. This protocol works kind of like an AP (Access Point), but instead of advertising services and a router - it just says, "Here I am. My name is XXX". It's that simple.
The name assigned via the third-party router has always been there. It's called Reverse DNS. This has been in place from just about the beginning of the internet.
So when you type a name into browser, it almost always does a DNS lookup. And DNS just exchanges domain names for IP numbers. On that, names are not particularly relevant, except for humans.
So in this case, it's quite likely the name gets sent to the router (which has handles the local DNS) and any protocol using the domain name simple gets an IP number, and that is what really happens under the hood.
I hope that's clear