My favorite part of this episode is Shatner's eye movements from station to station during the alert.
For the story, Bailey makes a useful focal point for the Captain and Doctor to conflict about, also gives the viewer the "everyman" to relate to. In reality, I'm trying to imagine a present day Mr Bailey freaking out on the bridge of a missile submarine and having any career left afterwards.
The adding of emotion to a group that by training and natural disposition are not going to be anything like that to "establish realism" seems to be required in military dramas. One can see why, the movie Apollo 13 has astronauts flipping out and smacking the sides of the spacecraft, whereas in Lovells book even during the explosion they spend most of the trip calmly reading checklists to each other.