I would say if they didn't warn him first and only suspended him, then that is unjust, but that doesn't seem to be the case here.
Schools have many dresscode rules, even if they seem silly, everyone has to follow those rules because there's good reason for them.
It appears from the article he was warned once, he did removed them once, but then he decided to "take a stand" and continue to wear them.
He should have been suspended. He knew the rules.