From the war of independence to the latest deployments in Afghanistan. Day Codes are used. They are used by virtually every military in the world.
The Code is pretty much chosen as I described. Randomly placed finger in a large book (Telephone book, Dictionary, Bible etc.)
The Day code is not an individual code but known to a group.
All soldiers and units that take part in a special operation (Beach landing, Pearl Harbor Attack, D-Day etc.)
Soldiers and units that are attached or detached to Guard Units - Watches - receive a Day Code.
Missile Commands are also issued with a day code.
It was invented / became into use in the early battle fields. When camps and positions were more or less known to the other side. All a spy needed to do is dress in the Uniform of the enemy and check out positions and such.
The issue of a simple word (A guard post and every soldier of that post could remember) was quite effective to prevent spur of the moment recon and Intel (Not a sophisticated spy of course) but the low level recon activity of an enemy commander who send out a few guys.
It was also a low tech alternative to badges, documents, IDs etc.
A guard could call an approaching person. Halt who goes there and ask the Day code. It would allow a first verification on a distance.
Even a simple paper document isn't forged overnight. So the daily changing Day code is an added step.
In some large operations like beach landings. Only the actual participating troops (Marines, navy support etc.) would receive a day code other Marines did not. A landing force of 20,000 marines is hard to security check. The enemy might have ears and eyes on the base.
So attaching a day code to an operation and issue it to the participating troops. Section Commanders, Orders could get issued right over the base / ship PA example: Day Code: Inkwell- contact your COs - . Or Caddy shack - Caddy shack commence.
All associated soldiers would know what to do, whom to contact. Their bunkmate not.
These are just one of many examples how a day code is useful to the daily operations of the military.
In some Units a Day Code is issued to access Computers and communication networks. Since many individuals might need access but the people allowed access for that day varies, only the group access receives an e mail or text or communicator message with the new day code. The system is locked and only those with the new day code can access it again.
The crews manning a Missile Silo. Receive a daily changing Day Code (all silos across the nation) If they receive the call they are asked that code. To verify they are the officers on duty that day. All soldiers of that silo are security cleared so their clearance is not an issue.
The usefulness of a Day Code has not changed in the last 200+ years and even in the 21st century with complicated cyphers. Organizations like the NSA, CIA, Navy, Marines, Army etc. issue Day Codes.
The Reason Union Commanding officers receive it, is an additional step that they are the ones on the current list of authorized individuals. For example a retired Captain still has his clearance but does not receive the day code.
The day code is issued only to those on the day code list. The list changes daily. Security Clearances especially the high ones are often issued time limited.
Or project/ issue related (Need to know) The Blue-Blue-Red clearance might still not give you unrestricted access to a Blue-Blue-Green classified issue if that issue is limited to a group of individuals. (Of course it is easier to request access if Need to know can be demonstrated)