Sort emails two ways: spam or not, and containing the word “free” or not. If the word were unrelated to spam, both columns would split the same way. The chi-square statistic measures how far the table strays from that, and spam filters keep the words that stray most.