It is not that God owed it to the apostles and others to apply the ransom because they had performed certain good works.
فَمَعَ أَنَّهُمْ جَاهَدُوا لِكَيْ يَتَجَنَّبُوا ٱرْتِكَابَ ٱلْأَخْطَاءِ ،‏ لَمْ يَنْجَحُوا دَائِمًا .‏