What could the Greek government have done? It didn't have popular support for alternatives. IIRC clear majorities of the Greek population were against the EU's bailout deal, but clear majorities were also against leaving the EU or ditching the Euro...so what was left?
Doing what the referendum said: refusing the EU's "deal" for "saving" Greece. Then either the EU folded (kept supporting greek banks, as it did the others) or finally released Greece from the Euro by letting the ones inside Greece lobbying to keep it there (the bankers and the wealthier portion of the population, those who though they had something to lose) go bankrupt.
Bankruptcy, allowing for the state to step in and reorganize things because it was necessary, would have been better that what Greece has been suffering through.
"Clear majorities" in several countries are
not against leaving the Euro or or the EU. Most people don't even think too much about this stuff until a crisis in going on. Then they're scared by a barrage of propaganda, that no one with influence over the media wants to counter. Rather the opposite. The
comprador elites in each country keep deploying that propaganda because the EU is their political shield.
The EU is a paper tiget waiting to be ripped in pieces. The only reason it has influence is because people believe it has influence - fall for the porpaganda. The rationale for the existence of the EU is supposedly economic, the one for the Euro certainly was, but the economic performance of the EU, and the "eurozone" in particular, has been miserable compared to either the pre-EU decades in Europe, and the contemporary developed world.
It's built on a lie. A lie that is not exposed because of the
real purpose of the EU: to be a political shield for the corrupt elites in each country. This is no accident, no "flaw" in the design: it has been the sole goal of the design from day one.
To understand this one has to dig into how political parties are financed in continental Europe, how political influence was
bought by the elites of some countries in others, how stability has been sought through processes of imitation by the conservative/business strata in each country... it's a big puncture, and a dirty one. As dirty as politics in the US, really. Corruption plays as big a role here as in the US and the UK.