A person can never know for sure what's going to be installed when acquiring software from illegal sources (not at all saying this is what you did). The main problem has become legitimate sources.
Aggregate sites such as www.softonic.com, www.downloads.com and others saw a great revenue scheme for them by tacking on adware with the software you actually wanted to try. While annoying, it wasn't so bad when this garbage wasn't as difficult to remove. They don't care. The adware makers pay them lots of money to add this stuff onto the downloads with little work to them to do it. What was a nuisance has crossed over to invasive malware. Especially newer versions that go out of their way to prevent removing them.
It won't happen, but about the only way to stop, or greatly slow the downloading of this junk is for everyone to stop using aggregate sites entirely. If you want to try a particular title you've heard or read about, go directly to the vendor's site to get it.