I disagree with some of these statements. Dental cavities are injuries and are treated like injuries warrent.
Unlike maybe trauma or cancer, dental cavities are a injury caused by decay of the enamel (the protective hard shell of the tooth). The decay is a result of the proliferation of bacteria, streptococcus mutants which releases an acid and breaks down the tooth.
When you have perforated enamel, other particles like food can get caught in the tooth and give rise to the growth of other bacteria. At this point you have a cavity.
Infection, the presence of certain toxins, and trauma all causes inflammation, a type of non specific immune reaction characterized by increased blood flow to the site of injury (which causes swelling, pain, redness).