Gmail has some special mailboxes that most users do not want to appear in their mail client. This is because these mailboxes contain duplicate copies of messages that are already in your other mailboxes. Additionally, the contents of these mailboxes are not filtered by SpamSieve unless specifically selected. When using Gmail, it is recommended that you hide these mailboxes from IMAP:
In Gmail, click on the gear menu at the top right and select See all settings.
Click on Labels (which is next to General at the top of the screen).
In the System labels section:
Note: If you don’t see Show in IMAP as an option, first go to the Forwarding and POP/IMAP settings and make sure that Enable IMAP is selected.