Although I don't know of any guideline for deciding when to use which font, these are some thoughts about the possible reasons. I suspect an important reason to decide if using a custom font or not depends on the goal the user has when visiting the website.
Loading external Fonts will add extra loading time. This means that the content the user came to get will take longer time to arrive as the Font also needs to be downloaded.
From your list, I think users visit with one of these two different goals:
- User visits the website to get a specific content/information
- User visits the website to spend time viewing the content
(There are users that spend time looking around content in the first group and users who come to get something specific in the second group, but here I refer to the goals from the majority of users or at least the ones the website is possibly most interested in.)
In the first group we can find Google, Amazon, Stack Exchange, eBay where the user comes to get specific information or content and the faster he gets it the better (and the less possibility of users going away). So the Font they use is a Font which won't take any loading time because it is already in the user's computer.
In the second group we can find Facebook, Medium, Youtube which are driven to make the user spend longer time. These website can load external Fonts as the potential time the user will stay is longer.