It's a bad idea because the energy used is worse than wasted since all it does is contribute to an increase in the mining difficulty for the entire network, thus worsening the environmental impact. It's actually better for the environment to leave that energy completely unused rather than use it for mining bitcoins.