A government can legislate that developing "cryptocurrencies" enables money laundering, terrorism and whatnot, and suddenly any developer is under threat ot being arrested if they are not anonymous. Of course any developed democracy would need to go through various proceedings to get such a thing done, but it's not impossible, and it's definitely possible in totalitarian regimes like Russia, China and whatnot (not to mention North Korea, where I sometimes cannot even fathom this nightmare state actually exists)
You can do the same with cash and that is not banned. I do not think countries will ban cryptocurrency when they know that it is not used for money laundering and only a small part of the btc community do illegal things with cryptocurrency and there would be civil unrest if they banned it with that reason. Russia has endorsed btc recently after many years of banning and denouncing it I think they realized that they cannot destroy it and they benefit from btc income as much as any other country.