If they worked we'd have already done it! But they don't appreciably limit the number of spam accounts (because people share their codes so widely and it's usually very easy for spammers to find lists, plus all they have to do is make one account that isn't obviously a spam account and let it age long enough to start getting invites) and it's enough of a PITA for normal use that it's generally not worth it, especially because dealing with invite-related problems is just as much admin time as dealing with spam.
The ultimate problem is that spammers are incentivized to drop their garbage everywhere because a first-page ranking in Google search for certain keywords can be worth millions of dollars and Google ranking depends at least partially on how many people are linking to you, so the people who want to boost their sites pay actual people pennies per account to create accounts on social media sites and make links all day. It's almost impossible to detect or stop because it's not automated in any way: they're real people making the accounts, and it's very very difficult to distinguish from "real people making an account to participate on the site" in any meaningful way other than the painfully painstaking method of "have a real person look at every one of them and make the call". The best automated solutions we can come up with are still only about 60% as accurate as I am :/
no subject
The ultimate problem is that spammers are incentivized to drop their garbage everywhere because a first-page ranking in Google search for certain keywords can be worth millions of dollars and Google ranking depends at least partially on how many people are linking to you, so the people who want to boost their sites pay actual people pennies per account to create accounts on social media sites and make links all day. It's almost impossible to detect or stop because it's not automated in any way: they're real people making the accounts, and it's very very difficult to distinguish from "real people making an account to participate on the site" in any meaningful way other than the painfully painstaking method of "have a real person look at every one of them and make the call". The best automated solutions we can come up with are still only about 60% as accurate as I am :/