There is more to a political party than voters. There are officials, activists, donors, party leaders of various stripes, organizers, etc. These are the folks who recruit candidates, organize campaigns, develop field operations, maintain the party in off-years, etc. The POTUS is also a party leader, and exists in a relationship with these folks. What he/she says and does affects the field for them. This even goes for the people running for president. But not all candidates understand their roles as such.
HRC is explicitly running as the leader of the Democratic *coalition*, which includes liberals as much as red state Democrats. Sanders is running as an ideological liberal, who is less concerned with party building than in changing the terms of the party coalition. And so, when you're hear HRC's answers on something like fracking, you should be asking yourself "who in Dem coalition wants to hear this?" The answer is: "Democrats in conservative places who don't want to make this salient in their campaigns."
It's a balancing act, between not alienating those coalition members, but also not alienating enviros, another important member. Sanders doesn't have the same kind of balancing act. He wants to make ideological liberals the fulcrum of the Democratic Party coalition. Which frees him to be more expansive as a candidate. But because the Democratic Party isn't purely transactional or purely ideological, it makes them both uncomfortable fits. Hillary is too transactional and too beholden to corporate-wing of the Democratic Party. Sanders' is probably a bit too ideological. It's noteworthy that HRC is strongest among most stalwart Democratic voters, Sanders among most ideological Democratic voters.
Anyway, in a real sense HRC and Sanders are running for two completely different jobs.
HRC is running as leader of a loose coalition of interests, Sanders is running as a champion of liberal interests. Obama was that rare figure who could present himself as both.