Let's say you got a malware like Keylogger. So once injected in your system all your keys are being logged and probably send to the hacker itself. So if by chance the hacker was able to identify that this certain key might be your password or your private key, then there's a big chance that we will attempt it and try to see if he/she got the correct combination and one day you will be surprised when all your coins is lost.
Of course running anti-virus like Avast is a good prevention. But you need to regularly updated it because its a virus, meaning it self hibernate wherein antivirus will be having a hard time to detect or it evolves itself, meaning another variant has been release. So its not a guarantee as well.