School is not about learning facts. It really, really sucks at that - go grab a book or twelve out of your public library and devour them for that. And it's not even for learning skills - the best way to do that is to get a private tutor, mentor, or coach, and then practice your heart out.
School is for learning culture. And culture, by definition, can neither be learned nor taught. It functions on a subconscious level, in terms of the little behaviors that people can never quite articulate but certainly notice. You have to be immersed in it to pick it up, and it takes a significant amount of time, and an open mind.
It's an open question whether all school cultures are worth learning. For me, elementary school bus culture and middle school culture certainly were not, and probably set my development as a human being back by a decade. But the culture at my high school - a public charter school that was just starting up - was a good portion of the reason I decided to go into startups, and played a major role in me becoming the person I am today. I wouldn't trade it for anything. The culture at Amherst, my alma mater, taught me to look at everyone I meet as a peer and equal, no more and no less, and to feel that I have nothing to prove, whatever silly hierarchies people dream of. And the culture at Google, IMHO, is without equal in the software world. You pick up so many practices and ways of thinking simply by being there.
So yeah, I think you are basically right. It's interesting that you pick out the pledge of allegiance as the most ridiculous thing in all of schooling. That's exactly what I mean by culture. And in this case, that particular ritual was designed to create a culture of subserviency, a form of indoctrination so that the masses of public schoolchildren would mindlessly support their power-elite overlords. It's bullshit, as you say.
But by recognizing it as bullshit and then putting up with it long enough to "win", you open the door to many other communities which are far less fucked up than the public education system. Google is nothing like middle school, and it's only similarities to elementary school are the colorful beanbags, the ballpit, and the massive quantities of Lego. But it's much, much easier to get into Google if you did well at elementary and middle school.