roasted garlic vs. raw
As covered on wikipedia, raw garlic has a number of sulfur-containing compounds, among them allicin, which are responsible for the burning feeling raw garlic imparts to a dish. When cooked into food, these flavors mellow and the compounds are boiled off or denatured. Other enzymatic and non-enzymatic transformative and browning processes also take place as garlic is cooked.

Roasting garlic produces these changes in garlic before-hand, and in a more controlled way. As the garlic heats up and starts browning, the raw garlic character is lost, while sweetness from melanoidin (a product of the reaction of amino acids with sugar, per the Maillard reaction) and savoryness (from the denaturing, concentrating amino acid content) are gained. The extreme example of this is Black Garlic (discussed at some length on my blog), in which the sweet and savory content of the garlic has been processed and concentrated over the course of a month, with the flavor resembling non-sour Balsamic vinegar. 

With that said, the inclusion of raw or pre-processed garlic will depend on the proportions of the two above-noted sets of flavors that are desired in a dish. If added raw to uncooked food, it will add very little savory or sweet, and plenty of aroma and burn. If added roasted to that same food, it will add mostly savory and sweet, with very little of the burn. Any further cooking that takes place after garlic's addition to a recipe will further discourage the raw flavors and aromas.