Btc is illegal in certain country because it is used by some people for illegal transactions. The governments bans bitcoin because they knew it some kind of money laundering, and sometimes btc is being used in illegal drugs and other illegal actions.