The UCMJ does cover contempt towards officials but its for comissioned officers. I believe they are looking to punish the soldiers for their remarks.
888. ART. 88. CONTEMPT TOWARD OFFICIALS
Any commissioned officer who uses contemptuous words against the President, the Vice President, Congress, the Secretary of Defense, the Secretary of a military department, the Secretary of Transportation, or the Governor or legislature of any State, Territory, Commonwealth, or possession in which he is on duty or present shall be punished as a court-martial may direct.
As a NCO I would not voice my anger towards my superiors or complain about going home. It would look bad plus funnel down to my troops. I would not keep any troop serving under me from voicing their complaints, but I would have simply told them to be mindful of what they say. The deck of cards comment crossed the line.