On the leadership of the party I concede, strictly, your point. We don't vote for a PM, although clearly people knew who they were voting to be the PM.
But the government was elected with a manifesto commitment to protect our interests in Europe and hold a referendum. It was not, to my knowledge, invested with a mandate to act on that referendum in the way that it is doing.