Full disclosure - I have been a public school teacher of both advanced and remedial Math/Science classes in a major metropolitan area for the past 15 years.
While I agree that there are some "bad" teachers that can not be easily fired due to union rules, they are in the extreme minority. The 400 pound gorilla that everyone wants to ignore is parent responsibility. If a student skips class, is disruptive when they are present, refuses to do homework, and thus scores poorly, how does that reflect on the teacher rather than the parent? The difference between an "A" student and a "D" is effort...yes, partially on the part of the teacher, but MUCH more so on the part of the child and their parent(s).
A "failing school" says more about a community's decline than it does teacher performance.
Those of you that bash the teachers' unions fail to realize that even though they are not perfect, they are the ONLY entity that fights for smaller class sizes (40 in my district), teacher training/development and fair wages.