This is Expected behaviour. Because GOOGLE, support itself says following :
Source : support.google.com/mail/answer/78755
If you delete a message from your inbox or one of your custom folders in your IMAP client, it will still appear in [Gmail]/All Mail.
Here's why: in most folders...