Answer: It’s for the flavour and the smell. We’ll explain:
When you add hops to the boiling wort (your un-fermented beer), many chemical reactions take place. The most important (and most noticeable) of these is converting much of the hop resin into bitter compounds. This happens all the way through the boil, and it’s integral to making the beer taste right.
The second most noticeable flavour we’re going for is the citrusy, earthy, and sometimes herbal flavour that contributes to the complexities and the body of a beer. These flavours are more subtle than just raw bitterness, and if boiled too long, they will disappear.
The third most noticeable component is the more explicit frutiness and floral aromas. These are usually volatile oils, esters and other organic compounds that will disappear very quickly when boiled. These are the hops we add last to the boil, and occasionally after the boil. Hoppy Heart IPA is a great demonstration of so-called “dry hopping”, which mean adding hops to the beer after it has begun fermenting.You get a delicious punch of smells and tastes, especially when you first pour the beer. Yum.
Hope that clears up some mystery from the brewing process, and it helps you make better beer!