Sure, and top companies are not necessarily discriminating amongst dev candidates based solely on technical merit. In fact, there are plenty of recent articles that claim that Google is looking for more and more "soft" skills in addition to high technical merit.
Point being, there are probably lots of factors that combine to make a candidate skilled enough to get hired at Facemazon. It's just that having that combination of skills is rare, so the salary gap persists.