Those with long memories may recall that in the early days of the internet and for many years into it, there were two methods of retrieving email from a server: POP3 and IMAP. (POP and POP2 were long gone when the internet became open to all comers.)
POP3 was designed to pull down email and delete it from the server, and it was apparently relatively simple for mail software developers to implement. IMAP was more sophisticated, allowing you to manage email on a server in folders and have locally cached copies. But it took many years before IMAP software on servers and in mail software was what one might call reliable and predictable.
But that split informs how people store email. You may have opted at some point, either with POP3 or IMAP (no matter what you use today), to download-and-delete email. All your messages are in a local folder on your Mac. But this prevents you from searching messages when you’re away from your computer unless you use some kind of remote access to connect back to it.