Part of these resources are being provided by people or organizations or governments who just want to Do The Right Thing.
Some more of these resources are being provided by those who see others Doing The Right Thing and thinking to themselves that "gee, if A can do it I should do it to show I'm just as good at DTRT as them".
And the last little bit are doing it for a positive karma, so they can get away with Something Bad later on...
A positive motivation for "doing the right thing" is the fact that these military crews have to stay proficient at their job. These emergency situations give them practice for the real world without having the dull feeling of a drill. Not to mention the fact that they would have spent the money flying those helicopters, planes, and sailing those ships regardless. The real question of cost is whether they were diverted from another mission of value, or whether they were just sitting in the south China sea practicing their ELINT skills?