> I don’t know how do they even harvest emails from Linkedin.

https://haveibeenpwned.com/Breach/LinkedIn

this is from 2016. at time they had ~400 million users,and the breach is 164 million, Now it's close to 1.5 B. People these days use aggregators like Apollo, signal hire, apify. There are 1000s of such tools.