It all comes back to money.
Spammers are paid to put as many of these up on sites where people may click the links. Think of it as a penny per post. Then the people paying the spammers get paid like 2 cents for each time someone clicks on one of the spam links. Usually the people who clicked and went to the site get malware installed on their computers just by visiting the site, which allows internet bad guys to steal their information, gain entry to corporate networks, or eventually use the infected computer for other forms of internet crime. Those sites installing the malware then sell lists of infected computers to other internet bad guys, and making money.