They get offers long before they even decide to switch jobs. They simply never had a LinkedIn account to begin with. It's a friend that calls them to tell them about the new project they are about to hire for.
Companies can either spend more on recruiting fees, or more on better devs that will try to get their friends hired...