Different countries might have different procedures, but I think in most cases an embassy doesn't want an overstayer to become their burden.
If they refused to renew an overstayer's passport to enable them to leave Thailand on their own, guess what, eventually one of their consular officials would need to visit that overstayer at the IDC - and that would just complicate matters.
I've seen many reports of overstayers obtaining a new passport, but not a single actual report of an overstayer who was refused a new passport just because of being on overstay.