That's okay and it's common enough. The sailors who end up serving on a sub want to be there and aren't bothered by being in close quarters and tight spaces for 90 days at a time. It's not for everybody.
Potential submariners go through extensive psychological evaluations and testing before they are accepted. I went through it in the late 60's and was bounced almost immediately because of claustrophobia.