The student was NOT suspended for not participating in the walk out, he was suspended because those students who chose not to participate (totally their choice) were required to report to a study hall. He did not follow that rule. The kids who protested had a right to walk out and those that chose not to were given an appropriate alternative.
I agree the other case took a rule too far. The school had a policy against the kids posting pics of themselves on social media with weapons. There was a huge backlash from parents because this kid was with his parents participating in a family activity. The rules were changed to be more specific.