Why do people put Coke on their ham?
sugar. With all the effects it has in a marinade.
caramel coloring. Well, it colors and caramels.
acid. Both the (volatile) carbonation and the phosphoric acid (not that much of it - undiluted phosphoric acid is a potent corrosive!). Possible tenderizing effect, taste enhancer, and will influence browning reactions on the surface (probably balancing the quick browning of all the sugar). Some cola brands are as acidic as plain vinegar!
various spices/spice extracts, some of which would also be well suited to savory cooking: Cinnamon and nutmeg, citrus oils (and also vanilla, which is of debatable merit in a savory recipe).