Because his own internal polling showed him leading by a pretty insurmountable, um, amount.
Eric Cantor's Pollster Tries to Explain Why His Survey Showed Cantor Up 34 Points
Less than a week before voters dumped the House majority leader, an internal poll for Cantor's campaign, trumpeted to the Washington Post, showed Cantor cruising to a 34-point victory in his primary. Instead, Cantor got crushed, losing by 10 percentage points.
This is what happens when you decide that you are entitled not only to your own opinions, but your own facts. Even when the actual facts are important to you personally, even when you might need to know the truth in order to plan your electoral strategy, the Republicans have fallen so out of love with reality, that they just can't stop lying, even to each other.
It's just like 2012, when all the polls showed Obama cruising to re-election, except the polls that FOX and the right were relying on, the "unskewed" polls that showed Romney somehow winning easily. And then they were soooo shocked and disappointed when it turned out that their made-up facts didn't reflect the actual facts.
So that's what you get, Eric Cantor.
This is what happens when you decide that facts don't matter.