It's literally based on the (estimated) number of search engine hits for e.g. "Python programming" on Google and a handful of site-specific search engines (e.g. Amazon, eBay, Walmart, microsoft.com, etc), with some manually applied tweaks for languages with easily confusable names. Many of the fluctuations in rankings - like the big dip in the ranking for C between 2015 and 2018 - probably have more to do with changes in search engine algorithms than any real change in popularity.
It wouldn't surprise me if I learned that the vast majority of programming globally is in languages like Visual Basic or PHP that are utterly unfashionable on a board like this, but still make the world go round.
It's a bit hard to comprehend that's reality to be honest.
But I could see that it could be the case from the fact that old industrial factories or old corporates would still run with what works for them.