Right. "The government" didn't push for Brexit. Then-prime minister David Cameron pushed for a Brexit vote largely because he thought that the measure would be defeated. Quoting Wikipedia, "Supporters of the Remain campaign included then-prime minister David Cameron, the future prime ministers Theresa May, Liz Truss, and Sir Keir Starmer, and the ex–prime ministers John Major, Tony Blair, and Gordon Brown" <https://en.wikipedia.org/wiki/Brexit>.
Retrospective analyses and Cameron's own account make clear that he saw advantage in calling for the referrendum with the expectation that it would be defeated. Example:
Cameron chose to commit to a vote, not because the country’s population was clamouring for one but because a significant minority of his own MPs ... were demanding that he do so...
Naturally, Cameron was aware he was running a risk – after all, his best friend in politics, Chancellor George Osborne, told him so again and again. But he thought he would win the vote....
<https://ukandeu.ac.uk/why-david-cameron-called-the-2016-refe...>