Why politically impossible? You can argue economically impossible, but the referendum overwhelmingly voted to reject the bailout package
The only real hand Greece had was to simply refuse the bailouts and refuse to pay the debts. In that case they would have been cut off from international bond markets, they would have had to renounce the Euro and start using a different currency.
All that was possible, but the Greek government could see the obvious - it would have been far worse than what was on offer.