When people started inserting ads into their web pages and earning money, someone got the wonderful idea of spreading a trojan program that would load random ads every time the internet was accessed.
Someone else got the idea of tracing people's accesses to their sites from the users' perspective, and thus allowing them to count the number of repeat calls the same user made.
Essentially just marketing schemes, these programs were easily modified by hackers, and created a class of malware called adware that constantly dunned the user with random adds some of which where totally inappropriate, or just set there quietly logging each access to internet sites. A clear breach in security. Usually this was combined with a cookie authorization scheme and the computer did not realize that the cookie was changing between samples.