Here's the key thing to understand: politicians are a bunch of psychopaths jockeying for personal gain and playing games at the masses' expense. That's pretty much all there is to politics.
Tsipras has been railing against the evil Troika for months on end, had the Greek people vote "NO!" on more bailouts, but suddenly it's alright to make a deal with them? You've noticed politicians lying time and time again, changing their positions like they change their socks, etc.. Well there you go.
We simply can't know what the hell went on behind the scenes during the whole Greek circus, but that doesn't really matter. All we can do is try and improve our personal circumstances in life, like for example the few (ordinary) people who transferred their savings the fuck out of Greece before they closed the banks on the hapless masses.