The United States used to boast truthfully that it was a nation of immigrants. Prior to the 20th century, a very high proportion of urban dwellers in major ports were immigrants. These people simply came to the US, mostly on ships, got off, got a job, settled down, and considered themselves “Americans.”
But their children were confused. They had grown up in Ruritania or Graustark, learned their local language from birth, knew only Ruritanian or Graustarkian customs, and had been taught to respect the customs and traditions of their old country.
Public schools in most American cities were given the job of “Americanizing” these young people. They were taught not just English, but American English, usually by their peers. They were inculcated in American history (only the good parts), and they were taught to respect the US, its institutions, and its leaders. The Pledge of Allegiance was part of that process.
Yeah, I always felt suoer weird about it as a kid as well. I actually still do. If you look at the other answers you’ll see a lot of explanations for why it’s important. I can understand the words, but I can’t understand the emotions behind them. Symbols, patriotism, those things are basically lost on me. I am an outside observer looking in at a ritual that holds great meaning for others in a way I can’t comprehend.