Walleye:
I don't know the exact traditions of all the military branches except the USMC, but here goes:
Usually, coins are minted with a specific military unit that you belong to and are given out for specific actions or accomplishments or even on a unit basis...meaning, you check into the new unit and are given the coin as a kind of welcome aboard.
Then, say you're at the club or a bar or whatever, and one of your buddies in your unit produces the coin and challenges you to produce yours, if you don't for whatever reason, you owe that person the drink of his/her choice.
Some of the military coins are cool...one of mine for example was for working with VMA-223, a Harrier attack squadron. Back in the mists dating to WWII, the squadron was very active in the island campaign...then the squadron commander commissioned Walt Disney to design the squadron logo of a bulldog wearing boxing gloves and it has been the unit's logo since, and called the Great American Bulldogs. Each of our coins was presented to us, each is serialized, and a certificate accompanied them. Kinda cool....