Depends on what country you live in. I think as long as the money is claimed on your taxes, in most countries you should be fine.
If the person is using his bitcoin to sell for online payment processor to get e currency and use them for buying digital services then none of the tax will be on him and none of the government can trace him.
and a lot of people are selling their bitcoins and none of them have faced any issue like that so it means it is legal and with bank withdrawal the government collect its tax etc.