Migrating email from Exchange (on-premises) to Office 365 (in the cloud) would seem to be a pretty simple and straight forward process, and when you know what you are doing, it is a methodical process ...
Office 365 can host on-premises messaging environmentS, including IMAP mailboxes, through different migration methods. IMAP migration, cutover migration, staged migration, hybrid deployment, etc.