It's the oldest U.S. Navy installation. It's position a mile or so from the Capitol building, on the banks of the Anacostia River, reflects the strategic considerations of an earlier time (likewise was Thomas Jefferson's choice to locate the Marine Barracks at 8th and I Streets SE, between the Navy Yard and the Capitol). After completing his solo trans-Atlantic flight, Charles Lindbergh returned, by boat, to the Navy Yard. Many of the remaining buildings are quite old, and the layout of the small base (roughly six city blocks long by three city blocks wide), with its tight, narrow streets, is reminiscent of the 19th century.
The last time I was there was before Halloween, when they turn the old Cold War-era destroyer permanently docked there and pictured above into a spectacular haunted ship. (It scared my kids half to death and we had to use one of the pre-appointed escape routes to jump ship before they were scarred for life). Then, as in the other times I've gone, my drivers license was enough to allow me to pass through the gates and drive on to the base. There were other non-public entrances to the yard, and I assumed that access to non-public areas and buildings was restricted, but I never had that suffocating sense of security that you get at some other federal buildings and installations in DC.
We don't yet know much about today's shooter(s) or a motive, so it's premature to make judgments about what security should have been or should be in the future. But it's worth noting that Washington Navy Yard is a relatively open installation because, among other things, it is an outreach tool and a place for the community to interact with the Navy. That close relationship is also reflected in the redevelopment of that area of southeast DC, which includes redevelopment of the Anacostia waterfront, with a new park and summer outdoor concerts almost immediately adjacent to the Navy Yard. The federal Department of Transportation's new headquarters is nearby, and just a few hundred yards further downriver sits the Washington Nationals' home park. The Navy Yard is one of the anchors of a part of the DC that was once a shambles.
The point is that Washington Navy Yard, because of its history and role in the Navy and in the surrounding community, is different -- and its security requirements are different, or at least more complex.