Mail in Mavericks is bad. Since the previews, I have not been able to archive emails for Gmail accounts or Google Apps for Business. A subset of mails archived directly on Gmail will appear and stay in Mail's Inbox. I'm not sure where the developers for Mail went to that they didn't have the resources to fix it. Maybe to help with the iOS 7 crunch?
In my head, Mail.app was written for Steve, who I imagine was a read-reply-delete kind of a guy, and not much else mattered.
There was even a windows version for a while, which you could get if you bought NeXT's Enterprise Objects Framework for Windows NT.