How Does Gmail Know It’s Spam Before You Do?

Every morning, I open Gmail expecting to see the emails that matter.