"Why would an organization like Stanford [put] this on the web and give it away for free??"
The question is better put as to why should they not. Stanford is a non-profit institute devoted to education, the advancement of science, etc. At this time in history, one of the most cost-effective / high-impact means to fulfill their objectives is to produce this material on the web.
The objective of a school like Stanford should not be to keep this material exclusive. There is no risk of going out of business -- the college experience plays too important a role for too many people. And there are tangible benefits to 'being there'; the networking plus the diploma can be helpful. A school like Stanford, or MIT already has to turn away way too many completely qualified and gifted applicants. Stanford can not effectively scale to address increased demand for the full experience. If it can help those it turned away to still learn, great.
It is also important marketing on both a short and long term scale. On an immediate basis, a potential candidate now has an opportunity to look inside to see whether college, and Stanford, is right for them. If they don't consider the lectures worthwhile, it is better to know that now. On a longer time scale, this bolsters the reputation of Stanford by showing their excellence of education. The meme occasionally circulates that some of the Ivies (and their technical equivalents) are soft, coasting on wealth and their laurels. As a Carnegie Mellon graduate, I can now see how Berkeley, MIT, or Stanford's coursework measures up. [I am ashamed that my own alma mater continues to retreat in the other direction, and worry that this will be a long-term competitive disadvantage.]
Likewise, as you describe, many may be convinced that a lower tier school is as comprehensive as the top tier. When we see these schools provide their lectures, a more fair comparison could be made prior to making a commitment.