Why add salt to the water when cooking pasta?
The salt adds flavor, but it also helps reduce the gelation of the starch in the pasta.  The starch in food is the form of microscopic grains.  When these grains come into contact with water, they will trap some of it (think cornstarch in cold water), but when the water is hot they swell up like balloons and merge with each other, and you have starch gelation.

Another thing you may want to add to the pasta water is some acid (lemon or cream of tartar).  Tap water in most cities is made alkaline, which increases the starch loss from the pasta to the water, making the pasta stickier.