I don’t understand this weird American obsession with flag. I was looking at some photos of Trump’s rallies. Flags everywhere - on shirts, hats, glasses etc. And this bizarre cult of the flag - “it cannot touch the ground” etc.
At the end of the day the flag is just a piece of cloth. If you worship any flag or take offense to any flag, you need to get a life.
The context of the origin of the US’ pledge of allegiance is it came shortly after the end of their Civil War when there was still a lot o political tension. A desire was born to instill national loyalty in children.
However, today as mentioned by another commenter, students cannot be legally compelled to recite the pledge, nor punished for not reciting the pledge as decided by the Supreme Court in 1943 using the first amendment as the base.