I've seen this also. Someone hacked wordpress sites and used it to link to a competitor with spammy viagra type keywords. The site was about digital downloads (nothing to do with Viagra and the certainly didn't hack sites for those sorts of links), but they got heavily penalized as a result.
Doing too many backlinks in a short amount of time, or having your links in a site or sites that gets penalised can always come back to haunt you