Quite often, it's easier for recruiters to get at your email address from GitHub because it's increasingly difficult to scrape contact details off LinkedIn.
That doesn't make it an acceptable reason to do so. They could probably google my home address easier than get LinkedIn to disintermediate themselves, but a barrage of recruiters at my doorstep would not be appreciated.
The truth is they probably don't know. These days the process of guesstimating an email address behind a LinkedIn profile is highly automated. Very often what a recruiter see on their dashboard is basically a list of potential candidates' LinkedIn profiles, paired with a list of plausible email addresses for each of them (with no indication of how the bots got them in the first place).
Automating a behaviour I disapprove of doesn't make me disapprove of their actions less.