Every time you throw a stack of uncooked pastas into a pot of boiling water, there's an unmistakable froth that appears. Have you ever wondered what the foamy gunk that arises in your water could be? Answer: it's thanks to a chemical combination of the boiling water and the pasta you threw in. Oh, science!
Turns out that since pasta is made from flour, water and sometimes eggs, the starch and protein are dried and stored into the noodles. When you throw them into boiling water, a heated and moist environment, the starch continues to absorb more and more water until it bursts. The result is starch molecules being expelled into the water, creating the froth you see.
The starch also causes the pastas to stick together in the middle of the cooking process, so you have to stir occasionally to prevent one giant lump from forming. After your pasta has finished boiling, the water is saturated with starch. So if you add a bit of that water to your sauce, it will allow the sauce to stick better to your pasta.
The more you know.