Well... it's more that a lot of the on ramps and exchanges are required to follow those laws depending where they are available.
There's nothing illegal about peer to peer non kyc... it's just that many, due to ease of use, do the kyc option and give companies their personal info. And honestly we've been conditioned to accept this as a normalcy.