cheapest to deliver

I don’t really think I understand the concept of cheapest to deliver. If a company files for bankruptcy, triggering CDS contracts. It has two series of senior bonds outstanding- 1 trading at 40% of par 1 trading at 50% of par. If asked what is the recovery rate for both contracts- answer is 40%. What’s going on here? Why does the company filing for bankrupcy get to choose the cheapest to deliver- and what to they mean by delivery? (Isn’t the defaulting company simply making a payment?)

If you have 2 bonds with the same characteristics, you can deliver the cheapest one. To deliver means literally delivering the asset to the counterpart. Remember that selling a bond incurs in transaction costs, so better deliver the asset and not full cash.

thnx!