spam comes back

often, when I command S on an email, it will go to the spam folder as it should, and then, a minute later it will reappear in my inbox, now it is grey. Why does it come back like that?

This could be due to a damaged Apple Mail database. Please see this page.