Cause and effect. There are many unintended consequences to every action, and actions, as we know, result in the manifestation of other forces, even if not always "equal and opposite." In business terms, as one industry prospers, another suddenly finds itself tagging along and enjoying the ride. Such is the case of the munchies.
THC is why we get high when we smoke marijuana; it's also why we crave sweets and carbohydrate-rich foods. When THC enters regions of the brain associated with mood regulation, it turns the dial to "euphoria." As it strolls past the olfactory bulb it enhances our sense of smell — hello, buttery popcorn. And when it comes to neurons associated with eating, impulse control, and inhibitions, a cocktail is brewed: you're going to eat more. Most likely that food is not going to be healthy.