It’s not just keeping the money coming, but yes it’s a job. In combat situations sometimes a chaplain is providing prayers, comfort, or available to listen to a patient, even outside of their own religion. They don’t have to believe the details, it’s for the patient.
My sister worked in more than one Catholic hospitals, and the Catholic Chaplain during orientation explained to nurses, techs, etc., not to assume anything about whether a patient would want prayers, not to speak using religious language, to always allow the patient to take the lead on anything religious. It was ok to ask a patient if they wanted a chaplain to visit their room, but even in a Catholic hospital they understand there are patients of other religions and atheists. I don’t know if the Catholic hospitals had chaplains from other faiths?
Most large hospitals have chaplains of many faith just as @Caravanfan said. My aunt is an atheist, but she liked having the rabbi chaplains come to her room. Even they would ask permission to say or sing a prayer even after she said she wanted the visit.