Unwanted flagged junk mail.
I have finally solved this problem of receiving pre-flagged junk email showing up in my flagged box.
All I had to do was go into Mail, Preferences, General, and then at the bottom of the page where it says "When searching all mailboxes, include results from", you deselect junk.
You will see that the flagged box shows a reduced mail count straight away and when you reselect the flagged box all the junk mail has gone.
Why searching through junk mail would put them in the flagged box is beyond me but as long as its fixed I don't care.
Good luck.
iMac Line (2012 and Later)