The narrative comes from the medias inaccurate and misleading coverage of the polls in 2016. Many news outlets all but declared Clinton president before the election.
Silver did a nice writeup of the whole experience: https://fivethirtyeight.com/features/the-real-story-of-2016/