Garlic burns because of the high amount of Allicin in it. Allicin is the result of bruised or cut garlic and it is essentially what creates that burning sensation when you get it. Some people have more of a tolerance for garlic than others and when the allin and allinase in garlic mixes together it forms allicin.
Allicin is garlic’s natural defense mechanism against consumption as well as invasion, taking care of harmful fungi insects along with bacteria that tend to consume it. There are certain things which can be done to minimize the effect that garlic has with regards to burning the tongue, such as mixing it with certain foods that are more neutral and less hot/spicy.