some people use it in illegal transactions hence the misconception of it being illegal. but it is not illegal worldwide. there are countries that prohibit the use/transactions of it maybe because of it being widely used in illegal transactions but that doesn't mean it is actually illegal.
Illegal transactions also apply massively to fiat transactions, but the government really cannot monitor the circulation of transactions from bitcoin and this is in their opinion the climax of all acts of fraud and crime.
The opposite will happen if the government is able to make very strict regulations, but unfortunately, bitcoin was created to be free without any government policies so it is very difficult for the government to connect and moderate directly with a very unique blokchain system.