I heard something similar about Russia after recent changes actually, it could as well be impossible for non-residents so tourists just stick with international roaming and public wifi. IIRC there's a catch-22 situation where you need a Gosuslugi (online government services portal) account to buy a sim, but you need a Russian phone number to sign up for one. As a citizen, you just need your ID (internal passport).
Though I've seen, plenty of times, smaller places have a "public" wifi with a password, and the password is just written on a piece of paper somewhere. That must technically violate that law. But you know, laws in Russia...
I'm sure the cops can get that info, but its mostly to enforce the "only one free register per year". Anyone can buy a phone with cash and use a prepaid sim with zero ID needed.