Depending on who you ask they were either silent protesting or marching to the sharp precision Trump wanted is something they don't do.
I believe it was likely the later - it was their way to protest. Kind'a like how they waved when in the tanks or riding horses and whatnot - apparently Trump was pissed at that.
As of my thirty-some years out of date experience, waving whilst on parade is an absolute no-no, unless specifically permitted in advance. But times change.
I rather doubt this was any kind of organized, or even disorganized, protest. The one thing I know for sure is that the military skews conservative, but not by much. Maybe 10% difference from the population. The decision to sign up is rarely motivated by who the Prez is at the moment.