Mail moving messages constantly - fixed
I had the issue of Mail moving messages constantly after upgrading to Sierra 10.12.6
I deleted all of the mailboxes on my MBP and reinstated them one-at-a-time. I waited until all the folders and stored messages for each account had downloaded from the server before moving on to the next account. (You can see a progress bar if you open Mail - Window - Activity).
This looks to have fixed the problem.
However, the number of people that appear to have had this problem points to an Apple quality issue. Was Mail tested properly? What changes were made in Mail or associated software? Something Apple did caused this problem, but the users are having to jump through hoops to fix it.
Apple used to be exceptional in software quality but now it is a lottery whether an update will break something that has worked for years either because it isn't backwards compatible or Apple decide to just remove support for something.
MacBook Pro 13", macOS 10.12