From an interview with Navy Commander Frank Castellano, who rescued Capt. Phillips from the Somali pirates:

I cope with long sea assignments away from family by knowing that there are people back home who care for me and keep me in their prayers to remain safe. Being a United States Naval Officer is both a profession and a calling, to serve your country with a dedication to the protection of the ideals on which the United States of America was founded upon. Additionally, I know that I am ultimately responsible for the lives and welfare of 270 Sailors onboard BAINBRIDGE โ€“ that keeps me properly focused.