I am going to say that
@quickfeet did a pretty good job describing how bots work. And then diverge quite a bit from your question here and try and explain the brokenness of the current internet, and the mechanism of the unapparelled breach of privacy that has happened on the internet the last few years.
A scraper is a different type of program than a bot though. It just collects information on people. At this point, every single website is going to have its own built in scraper. Every time you access any site, your IP address gets logged for any page you visit, video you play, link you click on etc. Every single movement made on the internet is recorded and tied to an IP address. It's very easy to tie an IP address to specific person. Even if someone tries to use a VPN, and then try to log into their email, bank account, etc, that VPN IP is going to be logged and tied to your personal log in, which is going to be tied back to a non-VPN IP. Your phone has an IP, your computer has an IP, etc.
On a site like this, we register the clicks, but we do not save them off. We want to protect your privacy. We don't build up profiles of IP addresses, or even run advertising that would do that through a 3rd-party
In a general sense, any site that is running advertising is saving off information (like google ad sense). Not the site specifically, but the software that has been agreed to be run on the site. Ad companies pay sites for clicks. But they aren't paying to sell their advertising at all, they are paying to collect information on the people.
According to law, people are granted privacy implicitly. Meaning unless you give a site permission, your information cannot be shared. But now you notice that almost every site you go to makes you agree to a cookie policy. And even if you don't agree their is fine print somewhere that says we are going to sell your information unless you click not to sell in a very obscure spot. But that agreement gets disabled on future visits to the site, so if you don't disagree with the cookie policy and find the do not sell my information button on every site you visit that sells information (i.e. any site running advertising), your information is scraped.
You run ad-blocker? Meaningless. You might not see the ads, but you are still agreeing to sell your information for using the site
It's not just one person or one secret group of people that knows everything about you. There are countless people that have access to this information from all kinds of businesses and agencies. You are the product.
I might try and compile this into a better article or explanation at some point, but everyone has been completely cucked.