IMAP allows you to create folders on the mail server. Spam folders are also kept on the server.
If your IMAP folders are not showing up, follow these steps to subscribe to them with your Mozilla Thunderbird mail client:
Step 1. Select the mail account from the left column.
Step 2. Right-click on your mail account name and select the Subscribe... option.
Step 3. You will see all the available IMAP folders on the server. Select the ones that you want to add to your mail client and click the Subscribe button.
Step 4. Press the OK button and you will notice that the new folders are now available.