Hosting (expecially a static site) can be free or extremely cheap, but a domain has a cost associated with it. A free GitHub page will be at the domain: https://
They could set up a infinite amount of accounts yes but with captas /verification codes in between they would need to do it manually.
I don't think it'll stop spammers all together however I do believe it will make it very difficult if not impossible to automate.