With 20+ years in the service, and 12 of those spent in Law enforcement, I can give a little insight into the reasons for blades restrictions in the military........
The main reason that there are restrictions on blades stems from the fact that all militray installations are federal properties. These federal properties are based in many states. In order to keep continuity, stateside installations are required to adhere to most of the laws wich apply within that state. So, whatever the law in a given state is regarding blade lengths, that determines what is legal for a soldier, sailor, airman, or marine to carry when not involved in a specific military operation.
The UCMJ (Uniform Code of Military Justice) also gives specific authority to commanders to impose greater restictions than are written in the code. Basically a commander can "add to", but may never "take away" from the UCMJ, hence the differences between services and installations in addition to local laws.
This also leads commanders, from the top down, to sometimes place more restrictions on "weapons". Privately owned weapons are strictly controlled on military installations. Anyone who is single, and living in a barracks may NOT keep anything greater than a kitchen type knife (with a restricted blade length) in their room. All other items (to include "writst-rockets", BB-guns, and the likes)must be stored in a central armory. These items must be registered with the unit commander and 1st seargent, and must be signed in and out by the owner. Should a person be married, and live in base housing, you are allowed to keep your firearms and such in your home, however, these must also be on record, listed by caliber, type, and make with the individuals' unit commander and 1st seargent. Control is kept by random inspections of quarters, and of vehicles coming in and out of the installation.
Concerning the question of why we carry M-16s, machineguns, etc, but are restricted on other day to day carr items is for the reasons mentioned in the previous posts. One of my additional duties is running my unit's armory. Very strict controls are in place for issuing weapons, and accountablility is at it's highest where weapons are involved.
As you can see, "weapons" restrictions are the greatest where you would not expect them to be. But, that is part of the game when you raise your right hand and give your oath to serve.