Not all crypto privacy coins and mixers are illegal, but their use may be viewed as illegal depending on the laws in the respective countries. Although the use of privacy coins and privacy mixers is not directly illegal, some countries have tightened regulations against the use of cryptocurrencies to prevent money laundering and other illegal activities. Some countries even specifically prohibit the use of privacy coins and privacy mixers.
Therefore, it is important for cryptocurrency users to understand the laws in their country and do their research before using a privacy coin or privacy mixer.
the main reason of the existence of privacy coins and mixers is owed to anonymity. however, as time goes by, these coins as well as mixers have been used by some people for money laundering schemes, hence, getting branded as illegal by some governments.
as you said, if one person will use a privacy coin or a mixer, make sure he knows the current protocols of his country towards this type of currency or services. it is viewed as illegal by some governments, whereas, others are still loose with their regulations. now, it is your own duty to find out what's acceptable in your country.