Fun fact: the Pledge of Allegiance was written by an avowed socialist [0] and was intended to counter the individualistic and capitalistic tendencies he saw in American culture.
Great information! I assumed it was some random patriotic thing, but this sounds sinister. It's probably not a big deal but I don't really know how much influence it actually has. Most people seem to see it as tolerable or cheesy, not some great and worthwhile gesture.
Regardless of who wrote it I've always kind of thought it was weird. If America is a great country then it should be self-evident and we don't need to try and indoctrinate children with it.
[0] https://en.wikipedia.org/wiki/Francis_Bellamy