Emails can be flagged as spam for various reasons, including poor sender reputation, use of spammy words, lack of proper authentication, and more. Spam filters are designed to protect users from unwanted and potentially harmful emails. They analyze multiple factors such as email content, sender's IP address, and user behavior to determine if an email should be classified as spam.