Except, that's not how most laws mandate it. The verification of personal data, its storage and the subsequent authentications based on it are done by a trusted third party - usually a government agency. Either they (the agency) maintain the mapping between the real life identities and the 3rd party online accounts, or they give the 3rd party an ID code which cannot be used to retrieve the personal info without the consent of both the agency and the individual user. Thus, you don't litter your personal data everywhere on the web and risk leaking it like this.
All that said, I'm still not a fan of such invasive arrangements and laws.