The framework works well but only to the extent that markets can properly assess the solvency of a country and calculate the risk premium, distinguishing solvency problems from liquidity problems. In other words, market discipline is effective and creates the right incentives if markets function properly.
But when markets do not work properly, because of the high level of uncertainty, because there is contagion or a general fear of systemic risk, market participants are no longer able to properly assess the risks and distinguish between them.