There is a way to not show the spam folder (or other folders of your choosing) in Apple Mail. There’s a feature at Google called Google Labs, and in that you can turn on some extra features for IMAP and Apple Mail. Some of those extra features allow you to control what IMAP folders appear in your Mail sidebar.
First, quit Apple Mail. Then go to your Gmail account (via Safari or Firefox) and click on “Settings” at the upper top. In that, go to the “Labs” tab. In there, you’ll see a list of features. “Advanced IMAP Controls” is near or at the top. Enable that and then save changes with the button right above.
Now, go the “Labels” tab in Gmail settings, and you’ll see a list of folders that appear in the Gmail interface. Next to them are check boxes for the folders you want to show in Apple Mail. You can uncheck “Show in IMAP” for the spam folder, as well as any others. Save your changes and then start up Apple Mail. It will sync with Gmail and you’ll not see the spam folder, as well as others you unchecked.
This doesn’t delete the folders or email from Gmail; it just doesn’t show them in Apple Mail. Spam will continue to collect at Gmail, but you won’t see it in Apple Mail and Gmail will delete it after 30 days.