Sliced garlic tends to have a milder, sweeter flavor because it browns more evenly and releases its oils slowly, while chopped garlic has a stronger, more pungent flavor due to the increased surface area and quicker release of allicin.
The difference in flavor between sliced and chopped garlic comes down to how the garlic is processed and how its compounds react during cooking. When you slice garlic, you create larger, flatter pieces. These pieces brown more evenly in the pan, leading to a sweeter, more mellow flavor. The slower cooking process allows the garlic's natural sugars to caramelize, contributing to this sweetness. Additionally, the oils are released more gradually.
Chopping garlic, on the other hand, creates much smaller pieces. This significantly increases the surface area exposed to air and heat. When garlic is crushed or finely chopped, an enzyme called alliinase is released, which converts alliin into allicin. Allicin is the compound responsible for garlic's pungent, sharp flavor. Because chopping releases more alliinase and thus more allicin, chopped garlic has a much stronger and more intense flavor than sliced garlic. The smaller pieces also tend to burn more easily, which can further intensify the flavor, sometimes to the point of bitterness if not carefully monitored.
If you want to mellow the flavor of chopped garlic, add it to the pan later in the cooking process. This will prevent it from burning and reduce the amount of allicin that is released. Alternatively, you can soak chopped garlic in cold water for about 10 minutes before cooking to reduce its pungency.