All countries—especially small and/or underdeveloped countries—need foreign trade in order to develop their economies, and it’s really really hard to engage in foreign trade without credit. And “if you stiff your current borrowers it may be harder to borrow in the future” is a risk that civilians have right now; creating a sovereign bankruptcy code won’t change that.
I forgot to mention that such a code would actually help borrowers, in the following way: For countries in a debt crisis, the lenders holding 90% of the debt may realize that they aren’t going to get paid back in full, and therefore would agree to a settlement where at least they get something back. But the ones holding the remaining 10% can pound the table and say “no, we want payment in full, and we’re legally entitled to it”... which leads the 90% bloc to say “well, if they’re still entitled to payment in full, we’re not going to be suckers and settle for less”... which leads the indebted country to say “we can’t possibly pay you all in full, so screw you all, we’re defaulting”.