>>521155350 (OP)
there's nothing stopping governments from passing laws to say this or that technology is illegal. the problem is enforcement. the government doesn't have infinite resources. prohibiting something like Monero, the best use of resources would be targeting on/off ramps (like exchanges). to get residential ISPs to make efforts to try to block things like the node or mining traffic. to block the download pages for the software and so on.
But it would be a cat and mouse game, people would develop ways of hiding the fact you were running a node. people would add more ways of using existing (legal) crypto to mix coins (like we have with bitcoin and monero coinjoin).
but the thing is that when you make all this illegal you just push things like the on/off ramps to the blackmarket. law enforcement would rather just ask places like coinbase to comply and get things like KYC data and use blockchain analysis on the legal and clear transactions to try to work out where coins are going. if it all is forced underground and with mixer tech or built in privacy like monero their job (to catch the likes of drug dealers) just gets harder. ultimately they'd rather let some criminal think they can withdraw their traded crypto off exchanges and let them do that, to catch them (get their actual bank details and so on) than have to try to decipher something as private as monero (where they'd have to run a bunch of nodes, exchanges, etc themselves). Too much hassle.