Choose desired settings for your Thunderbird.
1. If you use POP: Thunderbird can only access the server Inbox and download emails into the Thunderbird pop mail account Inbox.
2. If you use IMAP: IMAP mail accounts see a remote view of server. The folders synchronise with the server, headers are usually downloaded and when you select an email, the email is then downloaded to a temp folder to facilate viewing. It is not stored in Thunderbird.
You have to delete emails manually but you can change the settings as you want.