Of course, if you use Internet Mail provider and/or Outlook plugin you should be protected without need to run an on-demand scanning. Avast did that because it was the only thing you can do in an infected stored message. Avast should protect your computer and you had a virus. It warned you and you should send the file to Chest or moved it to another folder. You deleted it 
It should not happen when you scan the emails while you’re downloading them. The provider will manage (delete, send to Chest, etc.) just the email you’re receiving right now and not the entire Inbox.
It’s not a bug. It’s the normal protection of an antivirus. Sorry, you should not delete the file. I understand but, sometimes, we need to know exactly what we are doing in front of this evil display :-\