I didn't say you were. You said it may seem like a silly question, to which I merely agreed. That said, now look closely at the photographs in question. Download them and enlarge them if you have to; then tell me what you do, or more importantly, don't see on those piers.
While you are pondering that; consider that the bases of this sort are patrolled by a combination of DoD police and US Marines. Between the two, someone who wanders into an unauthorized area better hope it's the former that apprehends them, as the Marines take that "shoot first and ask questions later" stuff very seriously. The access gates have the means to instantaneously deploy barriers that stop any unauthorized vehicle from entering the base. They pop up out of the ground at the press of a button.
As Popeye indicated, without a proper DoD ID, you aren't getting on; and contractor and private vehicles are vetted before a base access sticker is issued and affixed to the left front windscreen. That's the first ID anyone sees. The second is the aforementioned personnel ID card. Those patrol boats he mentioned are manned by a combination of USN and US Coast Guard personnel. They are very fast, and armed with a combination of .50 Cal machine guns and 40MM automatic grenade launchers.
As Popeye also mentioned, should someone be stupid, and lucky enough to make it on to one of those ships, they then have an entire duty section's worth of personnel armed with 9MM pistols, M-14 rifles, M-60 machine guns, and 12 gauge shotguns to contend with. They may not be top of the line infantrymen, but they can shoot well enough for that environment; and they know their ship. A stranger wouldn't.
Now, could someone do some damage? Sure; nothing is foolproof and no ship is unsinkable. However, short of a backpack nuke or some chemical or biological weapon; I cannot think of any credible threat that would cause even a "mission kill" on one of those ships . . . and I am still waiting for what you don't see in the photos.