Thunderbird can move spam automatically to junk folders

If you configured Thunderbird to move automatically spam messages to the junk folder and it “refuses” to do it, whether you mark them as “junk” manually or they are marked as junk by Thunderbird itself, you have a problem that can be solved, usually, by closing Thunderbird and going to your profile (e.g. at :\Users\YourAccount\AppData\Roaming\Thunderbird\Profiles\SomeName.default\Mail\Local Folders) to delete the “junk” and “junk.msf” files.

However, this may not be the cause of your problem and you should leave it as a second option.

If you have an AntiVirus application that discovered a virus in a message of your junk folder, it may block normal Thunderbird operations in the junk folder. You can test this by disabling temporarily your AntiVirus and running again your junk filters. If they work, you can add your Thunderbird profile folder to the exceptions of your AntiVirus program. In this case you have to be very careful in the future what attachments you open whenever you receive email messages containing attachments.

Check also this post on how I defeated eMail spammers forever!