But it clearly does have something to go on - the gmail messages of millions of other users! And as I noted in an edit, ChatGPT can fairly easily tell them apart, even just from the subject line/first paragraph (and even explains why it believes they are or aren't spam).
But isn't google's whole schtick about creating a personal profile just about you? Maybe they think you are in the market for some offshore v!agra or would like to get in on the ground floor of some crypt0 investment opportunity...