Inside Gmail a message exists exactly once and labels are tags on it. A message with three labels is one message shown in three places.
IMAP has no such concept. It has folders, and a message lives in a folder. To expose labels to an external client, Gmail presents every label as a folder and adds a system folder called All Mail that contains everything.
The arithmetic follows. Any migration tool sees the message in the label folder and the same message in All Mail, and copies both, because as far as the protocol is concerned those are two messages in two folders.