I have worked in settings with great unions and others with not-so-great unions and no union. I have received amazing raises and benefits, and even supports when I was a new teacher to make sure my teaching improved so that I wouldn't be on anyone's radar. I have also worked in schools with at-will contracts and without union representation; I can't begin to describe the stress in those situations and I don't imagine I did my best work each day due to that stress. So in general, I am very pro-union.
But I have also been in situations where unions have represented the faculty at all costs, without input from the faculty they are representing, and an unwillingness to budge or compromise. This didn't happen quite like this, but an example would be forcing a school to immediately reduce class sizes by one or two students in a district without funds to hire more teachers, meaning classes for English learners and advanced classes would be closed. Teachers stated that they were willing to keep the few students if the district added more teachers in the next year, but the union would not move on that. In those instances, it appears that the unions' purpose is not the stated one; rather something larger and more political that may not be in the best interest of the students and community.
While very biased, another example is from Waiting for Superman and the "dance of the lemons" for tenured teachers in New York. As I mentioned, I have seen where unions step in to help with these issues. But when they do not, it raises questions about their true purpose.
In short, I believe teacher unions would be less vilified if they worked in the interest of teachers, parents, students, and administrators.