Again, allow me to emphasize that bitcoin is not illegal per se. Unregulated, yes. But illegal? I doubt.
The problem lies in the government not being ready for the existence of digital currency. Who would have thought that digital cash can happen as early as 2009? No one anticipated. Moreover, no one thought that it would be possible to have a system of payment that does not require a central authority. And in this case, banks became irrelevant as they serve no intermediary purpose between user's transactions.
Then Bitcoin was designed to be permission-less. No one can restrict or impose its' usage. Here, the government becomes irrelevant. With pseudonymity in place, the government felt it is a direct threat to its sovereignty.
Perhaps it is under these impressions that Bitcoin seems to be illegal when it is not, rather, unregulated because the governments was never ready for cryptocurrency.