That's because people confuse nationalism with patriotism. I love my country, which is why I want it to be better. Others love their country because it gives them permission to be worse.
To be clear, it's still not good. I support any kid that wants to sit out for the pledge or sit or kneel for the national anthem. It should always be non-obligatory. In fact, I don't love the word "allegiance" to begin with.
But it would be significantly worse if the pledge of allegiance was to Donal Trump. Ultimately, that's what many people are following, but it's not default in schools to pledge allegiance to him or anything.