Alcohol serves two functions, depending on your recipe: It is a solvent for certain compounds that do not dissolve as readily in water alone, and it is a mild acid. The former reason is why the "alla vodka" sauce uses vodka (the alcohol boosts the tomato flavor, completely overwhelming the subtle flavor of the vodka itself). The latter is why many cooks add a shot of brandy to beef stew shortly before serving, to "brighten" the flavor.
By the way, while much of the alcohol cooks off, unless you cook your sauce nearly dry, a good bit will remain. For a very boozy sauce (like the glaze for cherries jubilee), many cooks ignite the sauce to accelerate the removal of excess alcohol, but even then, a small amount will remain behind.