Why does Avast and other antivirus' detect gpu miners as viruses?
This is probably because hackers install these miners on peoples computers without their knowledge or make a botnet of miners. 

Solution to this is placing your miner to ignore-list or get another antivirus like Avira, Avg, or just switch to linux and no need for antivirus anymore.