As you probably know, adding someone to your contacts is the best way to make sure that the messages aren't flagged as spam. When you mark a message as spam, it's likely that the following messages sent from the same address will be flagged as spam by Gmail. So there's a conflict and Google tries to fix it by assuming that the email account has been compromised.
"Normally, we'd expect that you would want to get messages from people on your Gmail contact list. So when you mark one as spam, we'd like to understand why. [When you] click 'Message looks suspicious' within the alert, the message will be marked as 'sent from a compromised account,' and you'll send a report to the Gmail team to help us improve our detection of compromised accounts. Your contact's account will not be penalized and you'll continue to receive messages from this account in the future."
Unfortunately for Gmail, the mail that triggered this alert wasn't sent by one of my contacts, so this feature doesn't work well.