I mean, you did read the part where the HTML cleaners were adding links to the content they were “cleaning” right? Whether it’s what is causing the higher ranking or not, they are certainly trying to do something underhanded.
This is not how SEO works. Putting a keyword in your page's title/text/etc can help somewhat, but it's a much weaker signal than (say) a couple thousand keyword links from seemingly unrelated sites.