Why is it important to add salt during cooking?
A few general reasons:


As soegaard says, the salt is often better distributed through the food if it's added during cooking. This is especially true for foods which have been carefully assembled; you can't always just stir things up! Some foods also take a while for flavors to soak through; think about potatoes in a chunky soup. If you add salt only at the table, the liquid will benefit, but the potatoes will generally taste bland, like they were unsalted. Then there are things where it really needs to be cooked in - I doubt many people want to sprinkle salt on a chocolate chip cookie.
Sometimes the quantities need to be pretty small, so mixing a small amount into the whole recipe is doable, while if you tried to add it at the table, even a little sprinkle would be too much. Baked goods are a good example here too.
Virtually everyone likes at least a little salt, so it's usually quite safe to add at least a little. The food will end up tasting good to many people, and then some can add more. Often the groups of people that we eat with have similar enough tastes that it's a non-issue.
Sometimes salt actually affects the cooking process, not just the flavor. It can help draw moisture out of sweating vegetables, softening them faster. It's abrasive (before dissolving, of course), and can help denature proteins.


But of course, if you're eating with people who don't like much salt at all, and salt can easily be added at the table (a pureed soup, for example), then there's nothing wrong with waiting until then.