I recently made spaghetti for dinner. I first got out a large pot, filled it with water, and placed it on a burner turned up to high heat. I also put a dash of salt into the water, since this is supposed to help it boil more quickly. While this heated, I grabbed a box of dry pasta and measured out the amount that I wanted into another container. I poured the pasta into the water once it was boiling. I allowed the pasta to boil for 8 minutes, according to the directions of the pasta box. I set a timer to prevent overcooking. One the timer went off, I stopped it, turned off the burner, and put on oven mitts. I also placed a colander into the sink. While wearing the oven mitts, I poured the pasta and water into the colander. I then removed the colander from the sink and placed the pasta into a bowl so that it was ready to have sauce added to it. 
Question: why are they cooking it?
To eat