Yes, illegal mining can tarnish Bitcoin reputation, this assumption comes from lay people who cannot differentiate "Bitcoin" from "illegal mining". However, I don't see it that way at all. Bitcoin is a protocol, it doesn't consume electricity illegally, it's the miners who steal it, but the stigma sticks to Bitcoin, just like the knife is blamed in a stabbing. When a bank is robbed, no one says the banknotes are bad, they immediately blame the robbers. When Bitcoin is mined illegally, people feel it gives Bitcoin a bad reputation, which I think is very unfair.
Bitcoin never encourages people to mine illegally, the protocol only directs anyone who wants to mine to prepare electricity and hardware. So, whether they want to be a legal miner or an illegal miner, depends on their choice.
Yes it is unfair. BTC never encourages people to mine illegally, it is greed that motivates people to mine BTC illegally without any permit. Now what differentiates this? How come people feel that it gives BTC a bad reputation and why do they go after BTC at all?
For example, in China they banned BTC and its mining. They knew the main reason for high energy consumption was BTC so they blamed it, but it never gave it a bad image, it is the psychology of people and how they perceive it.