The primary purpose of spam traps is to identify and reduce the amount of spam that reaches users' inboxes. By catching marketers who are not following best practices, ISPs can improve the overall user experience and maintain the integrity of email as a communication channel.