This is probably the 3rd or 4th thread on the movie so a lot has been discussed already.
I think that first of all we need to recognize that this is a movie intended to entertain. Watching a well prepared sailor make all the right decisions whilst sailing a properly outfitted boat for a couple of hours isn't going to be that much fun to watch unless you're really into sailing.
And like all movies it compresses hours and days into seconds and minutes. It's impossible to capture all the details we sailors might consider important and at the same time tell a compelling story within those constraints.
So given the above I'm going to assume that we're supposed to view "Our Man" as a competent sailor who calmly (more or less) deals with the situations he finds himself in. But even he has his limits and as things go from bad to worse he eventually reaches a breaking point.
The shaving sequence is merely showing us that even in the face of danger he just goes about his business. Or maybe he is nervous and just needs to keep busy. In this movie more than any other I've seen we're left to fill in the blanks. But I'm thinking the shaving scene is supposed to further impress upon us his calm demeanor.
Personally, if I had woken up to water rushing into the boat I would be freaking out big time and shoving anything I could find into that hole. Maybe I would have gone topsides first to see what the hell it was and if I could get it loose (I'm thinking it wouldn't take a sea anchor or drogue). Once I realized that I could keep the water from coming in by sailing on the opposite tack I certainly would not be turning around like he did to revisit the shipping container.
But then again, I'm not a Blue Water sailor and further I'd have no idea how much water that boat could take on before it was really in trouble. He seemed to not be overly concerned.