This is not to say that the reg's are just. Only to say that they exist. On the other hand, In order for an order or regulation like this to be enforceable, it must not contradict the constitution. That is where the grey area lies...
Look at section 4.1.1
4.1. Members who engage in any of the prohibited activities listed in this paragraph
and subparagraphs are subject to prosecution under Article 92, UCMJ, in addition to
any other applicable provision of the UCMJ or Federal law. Members shall not:
4.1.1. Participate in partisan political fundraising activities (except as permitted in
paragraph 3.7), rallies, conventions (including making speeches in the course thereof),
management of campaigns, or debates, either on one’s own behalf or on that of another.
This prohibition applies whether the individual is in uniform or not, and regardless of
whether an inference or appearance of official sponsorship, approval, or endorsement
may be drawn. Participation includes more than mere attendance as a spectator. (See
also paragraphs 4.1.9 and 4.1.16.)