The Flagged folder is an artifact on your Mac only. So if you copy an email to that folder, it gets double counted on the Mac (one in inbox, the other in the folder). But on the iPhone there are no folders, so the flagged email only appears once, in the inbox. Have a read of
this thread. Particularly post #2 from chscag. Part of the difference may be that you have IMAP on one and POP on the other. With POP, if a message is marked read on ANY device, it's marked read at the server and doesn't come down into your inbox on any other device. Also, you need to check to see if you are using IMAP, how long the mail provider is willing to store messages on the IMAP server. Most have a time limit, so that after that time it's deleted from the server and then on the next sync, from your inbox. It won't be deleted from the Flagged folder, if you've copied or moved it there, just the inbox. But since the Flagged folder isn't on the iPhone, when it gets deleted from the server, it disappears from the iPhone inbox.