Why does my gmail sometimes go to "Recovered Messages"? I'm using a mid-2011 iMac on Sierra (just updated a few weeks ago, from Mavericks).

Apple Mail is often, but not always, sending mail from one of my several GMail accounts, to "Recovered Mail" in the "On My Mac" section.  I have no idea why... there's nothing special about these emails, they're from a variety of sources, and those same sources sometimes come through normally, and sometimes not.

What is causing only some emails, some of the time, from only this specific GMail account, to go to Recovered Messages instead of my normal inbox like they should?

Actually I did just notice something they have in common.  Every one of them would have fallen into a rule I've set up, to move the messages into specific folders.  But I have lots of other messages that would also have triggered the same rules, and were unaffected.

An additional piece of information - these messages apparently will not move to their correct places even if I apply my rules to them.  They appear to - they disappear from Recovered Messages but they will eventually reappear there again.  They span almost 24 hours from yesterday to today (November 13).  I have tried a rebuild, but it did nothing.
Have you added and removed your GMail account recently? I see recovered messages mostly after removing an account and re-adding it.
Another solution would be to try clear Mail offline cache.