Gmail's IMAP implementation is really weird. If I tap the garbage icon in a message, it will archive the message, not delete it. If I swipe to delete, and confirm, it will archive the message not delete it. I think that's why Apple changed it to archive instead of delete. MobileMe is much better in this respect, it just works.