I saw a Navy chaplain when I was going through some tough times in the Marines. I told him right off the bat that I was an atheist and he didn’t push any religious shit on me. He just talked to me and worked with my command to get me seen by a trained therapist. Other Marines I knew had similar experiences. Chaplains are officers outside the normal command structure and are trained to provide services to everyone regardless of their faith or lack there of. Also a lot of military members are at least nominally religious so it makes sense to have someone to coordinate religious activity, especially overseas where there aren’t local religious institutions.
He’s a Major with 13 years of service so he has already completed his obligated term of service long ago. Unlike enlisted personnel officers are not on a strict contract and can request to resign their commission at any time after their initial obligation. He requested to resign his commission late last year and the Army accepted his resignation in January so he will be honorably discharged in June. He will miss out on the pension that kicks in after 20 years of service however.