According to the New York Times, the Greek government was essentially betting on its own insolvency.
They only made a measly 35 million euros on the deal, doing little to offset their billions of debt. But taken to its logical extreme, this strategy offers a brilliantly postmodern solution to debt problems. It's the perfect hedge! Worried that your government might be running up too much debt? No problem: just make a bet that you'll go bankrupt. If you lose the bet, then you didn't go bankrupt. If you win, then you use the proceeds to pay off your debts.
To be sure, there's a slight timing problem here. If you win, then you already went bankrupt. Maybe you can just "deem" everything back to the status quo ante and call it even.
If only AIG had thought to buy their own CDSs (or sell them - I can never keep this straight), we might have avoided the whole financial crisis!