You do notice it is only on planes, ships and submarines, not the Navy in general. Those three sets of locations are ones that all have restricted movement, limited emergency services, and are for the most part mission critical. That means that an incident that may have small consequences on land can have much larger consequences in those locations. Any kind of fire on an airplane or in a submarine is a major danger to personnel and the planes/ships themselves. Although the Cold War is over, there are still times when ships and submarines are in locations where outside assistance would not be immediately available, if at all. I realize it is fiction, but go read the last part of 'Ice Station Zebra' by Alistair MacClean, starting with chapter 10. I don't have any problems with the Navy's actions, and expect that sooner or later the outright ban will be converted into a more controlled environment, probably including banning the devices from certain areas of the ships, etc.
Besides, there are already times when NO smoking is allowed. Remember hearing in the movies 'the smoking lamp is lit', or more pertinent, 'the smoking lamp is out?' And how long is the average plane flight, anyway?