By salting the water, water and noodles are balanced in advance, and thus the taste remains in the noodle. If you were to cook the pasta in unsalted water, balancing salt ions would happen during cooking.