Setting aside the fact that Greece is already defaulting, because the negotiations with private holders of Greek debt are already based on an haircut of around 70% in terms of present value (and 50% in terms of face value), I want to explain here why, eventually, Greece will default on all its debt, including the debt held by the ECB and the European Union.
The first thing we need to reach this conclusion is to understand why a sovereign default is substantially different from the default of a private firm. Luckily, these matters have already been researched, and in this case we can lean on an FMI paper ("The Costs of Sovereign Default," by Eduardo Borensztein and Ugo Panizza) that explains it succinctly:
In the case of sovereign debt, creditor rights are not as strong as in the case of private debts. If a private firm becomes insolvent, creditors have a well-defined claim on the company's assets even if they may be insufficient to cover the totality of the debt. These legal rights are necessary for private debts to exist. In the case of a sovereign debt, in contrast, the legal recourse available to creditors has limited applicability because many assets are immune from any legal action, and uncertain effectiveness because it is often impossible to enforce any favorable court judgment.
There are also costs to a sovereign default. The aforementioned paper identifies the reputational cost and the chance that creditor countries might impose other sanctions, such as trade sanctions. In practice, the reputational costs are the most relevant, because they translate into the most direct and obvious consequence from not paying: being shut out from the credit markets for a (potentially large) number of years. There is also the discussion of the impact intra-borders, but such impact is somewhat irrelevant because it can be compensated by monetary issue if the country regains monetary control.
So basically, by not paying back, the most obvious consequence a sovereign faces is not being able to borrow more money for a few years.
And what is the consequence of making the moves necessary to be able to pay back the money that it already owes? The main consequence of that is not being able to expand the stock of debt it already owes, because to be able to pay back the existing debt, a country has to run a primary budget surplus.
In short, the main consequence of not paying back is similar to the main consequence of trying to pay back: the sovereign cannot expand its stock of debt on a net basis (new debt - debt service on already existing debt), with a huge difference - if the sovereign does not pay back, it doesn't have to pay debt service, either … if it tries to pay back, it has to pay debt service on the existing debt mountain.
What this means is that when a sovereign is forced to have a primary budget surplus, for that sovereign it can stop making sense to still pay back whatever it owes, because it won't be getting any new net debt anyway. It will just be exporting a part of the sovereign's wealth every year in the form of debt service for the already existing mountain of debt.
So both Portugal and Greece are yet to hit the level where the decision against paying becomes obvious. But with every austerity package they draw closer to it, and it is a paradox that if the austerity packages - designed to make sure the countries are able to service their debt - hit their goal, then these countries will have an immense incentive toward not paying.
In short, between not being able to expand debt and paying debt service on existing debt, and not being able to expand debt (because nobody lends, after a default) and not having to pay debt service, the choice will probably fall into the later at some point, since after taking that road the sovereign can then impose a little less austerity on its population (after the initial shock).
Indeed, that's probably why the default is not so uncommonly traveled as one would think (source: Calculated Risk):
Defaults by Greece and Portugal can be expected, because at some point they're the most logical options from the defaulters' perspective.
Post-scriptum: As a bonus, here's a (satirical) guide on how to properly default, "How to Default: a Primer" by Norman Strong (alias).
Disclosure: I have no positions in any stocks mentioned, and no plans to initiate any positions within the next 72 hours.