There are a number of different issues at play here, and a couple of implicit questions which need to be addressed: Firstly, is Sanders a popular candidate? If you define popularity as the difference between those with a favourable opinion of the candidate versus an unfavourable opinion, then polling data see e.g. the charts from the Huffington post suggests that he is (on +12%, versus -12% for Clinton and -21% for Trump). If you restrict this to Democrats, then the lead has changed a few times during the campaign, see e.g a story from Gallup in April but there have certainly been periods when Sanders was more popular.
Second, why do Sanders supporters think he's more popular? Partly this will be confirmation bias (on the lines of "I like Coca-Cola, so people who think Coke is good are right"), but also the levels of support for different candidates differs between different demographics and people are more likely to talk about politics with people who are "like them". So if you're a college student using social media you've got a high probability of being told to "feel the Bern."
Thirdly, how can he be popular, but not winning? Lots of possibilities here: people like him but don't actually vote, or aren't registered for the vote in their state, or vote for Clinton for reasons beyond popularity (such as perceived electability, or simply because she is winning and they want to vote for a winner). Also, at various times in the campaign the charts above have shown her as more popular among Democrats.
Finally, the motivation of people posting the kind of messages you're talking about is to get other people to vote for Sanders, so of course they're interested in promulgating the message that he's popular, even if at some points it's purely advertising.