Most cities require you to register your pet and get a license. Part of that process is to share the microchip number, vaccine records, vet info etc. Our local animal shelter usually checks with the city if a microchip is found but no ownership is established.
Here, pets have always had to be identifiable: historically with a collar, but microchips have been required for some years now as a more effective method.
(That applies nationally, not some city thing)
https://www.rover.com/blog/dog-license/
Usually it's an animal welfare and control thing: you pay a lot more if you don't spay/neuter, rabies vaccination is required, etc.. Otherwise it's too easy for a city to be overrun by strays.
Also, if your pet gets lost and ends up being picked up by animal control, it's considered a stray if it's not registered.
If you want to travel within EU with your pet, you'll need a certificate for that as well.
No idea about how it is is the US but that doesn't sound crazy to register pets as they are at risk of being lost, abandonned, lacking vaccination or vets visits.
I see this also with QR codes. I see tons in for, example, restaurants which contain a link to some private company which automatically redirects to the restaurant's own page. They can get it for free if they just put their own url in the qr code directly (if they knew it was possible, of course. They're nontechnical). But then the other company keeps charging you money just to serve pointless 301s