Internet Message Access Protocol (IMAP) is an e-mail access method where everything is centrally stored and controlled on the server side, not on your individual e-mail clients. It is the interaction between the client(s) and the server that determines what gets kept, deleted, moved to folders you create, etc.
If you have more than one e-mail client accessing the same account via IMAP no one of the clients is "in control." For example, lets say you have client1, client2, and client3. All three have communicated to the server and had either the message headers downloaded or the message headers along with some user defined number of recent actual message bodies so that you can access your newer messages if you are not connected to the internet on a given client at a certain point in time.
If you delete message X on client 1, as soon as client 1 does its next send/receive with the IMAP server that message is removed from the server (or moved to a trash folder, more commonly). Then the next time clients 2 and 3 do their respective send/receive communication with the server message X will be deleted from them as well.
This is a process of synchronization, which means that at any given moment in time there could be some difference in what you can see on clients 1, 2, and 3 if you were using client 1 and someone else (authorized, of course) is using client 2. In this situation, you on client 1 delete message X and the other user on client 2 deletes message Y. Depending on which client does its send/receive communication with the server first you could have one of two things happen:
1 Client 1 does its sync first, followed by client 2: Message X will be deleted from client 1 and will still be visible on client 2 until client 2 does its sync. On client 2 Message X will still be visible until client 2 does its sync as well, since that's when it's told to get rid of message X.
2. Client 2 does its sync first, followed by client 1: Message Y will be deleted from client 2 and will still be visible on client 1 until client 1 does its sync. On client 1 Message Y will still be visible until client 1 does its sync as well, since that's when it's told to get rid of message Y.
Essentially each of the individual clients could have to do two syncs before both look exactly the same, and this all depends on the timing of how all involved synchronize with the server.
Client 3 enters the picture and depending how its sync is timed relative to clients 1 and 2 you could have just message X disappear (sync occurs after client 1 but before client 2), just message Y disappear (sync occurs after client 2 but before client 1), or both messages X and Y disappear at the same time (sync occurs after both clients 1 and 2 have already synced).
Since most e-mail clients sync relatively frequently (a default frequency that's reasonably common is once every 10 minutes) you can see how these different situations might occur and how, after every client has synced at least twice (but often only once) all three will then have the same messages displayed in the same way.
You must not have the server automatically purging messages older than one year if those still remain in your inbox or other user-defined folders. This is actually the most common situation since it's expected that you will delete messages that you actually don't want.
Brian AKA Bri the Tech Guy (website in my user profile) - Windows 10 Home, 64-Bit, Version 1803, Build 17134
. . . the presumption of innocence, while essential in the legal realm, does not mean the elimination of common sense outside it. The willing suspension of disbelief has its limits, or should.
~ Ruth Marcus, November 10, 2017, in Washington Post article, Bannon is right: It’s no coincidence The Post broke the Moore story