Bernie knew this was happening to some degree, they all did.
This may be hard, but it's also part of the fake news distortion both the MSM and hostile disinformation spread: Bernie also knew that many of his primary voters weren't genuinely for him, that very significant percentages of his primary voters across the country were conservative spoilers trying to beat Hillary. In poll after poll they admitted that they absolutely would NOT vote for him in the general if he won. But the media, MSM and social media skewed their reporting so that it bore little to no resemblance to reality and his supporters ultimately couldn't believe he'd lost, as he always had been. Bernie himself justified it by believing in himself and the importance of what he wanted to do, but he did base his chances of winning on pumping up the image of his support so that it would create more support (people love a winner), including employing strategies that blew on fires set by fake news stories from shady sources. Like Hillary's supposed thefts of elections that never, ever happened.
This is not just our world right now, but the one all pols had to work within. We need to understand so that we can demand it not happen again. 2018 is coming up fast. We desperately need laws passed to control media manipulation of our elections.
Hopefully, Russia will help us do just that. Putin got the badly divided Republican-controlled senate to vote 98-2 to increase sanctions on Russia, after all. And publicly humiliating conservative congressmen and the other nasty sticks he's enjoying poking us with aren't helping him in the house either.