Boiling the wort serves many purposes, including:
To sanitize the wort via high temperatures;
To extract alpha acids from the hops, which lend bitterness to the finished beer;
To extract flavor and aroma from hops as well as from other ingredients such as herbs and spices or fruit;
To drive off unwanted volatile compounds;
To coagulate unwanted proteins;
To boil off water, thus concentrating the wort and increasing gravity