Should a teaching statement be posted publicly on the web? I noticed that some professors and instructors have their teaching statement available on their webpages, and others don't. 

I thought teaching statements were used mainly for applying for jobs, so since these professors and instructors have jobs, what is the purpose of having their teaching statement available to the public?

Is there an advantage to posting the teaching statement publicly?
It can be advantageous to post your application materials publicly while you are searching for a job (because it alerts a broader audience to your job search and lets them quickly find out more).  Once your search is over, I see no career advantage to keeping these materials on the web.  I think the main reason to do so is as a service to others.  It's useful for graduate students to see a wide range of research and teaching statements, so that they have a clearer idea of what they typically look like.  This if possible only if some people make theirs available.

There are also several other reasons someone's teaching statement may remain available.  One is that they forgot to take it down, and another is that they feel it provides students with useful information about their approach to teaching.  However, I'd bet that keeping it online as a public service is the most common reason.