According to Smithsonian Magazine,
It’s one of the most well-known effects of marijuana: the powerful surge in appetite many users feel after smoking or ingesting the drug, colloquially known as “the munchies.”
For medicinal users that have trouble eating due to chemotherapy, this can be one of the drug’s biggest benefits. For recreational users, this benefit can also be rather enjoyable, if unkind on the waistline. But for years, scientists have struggled to understand how marijuana’s active ingredient—tetrahydrocannabinol, or THC—stimulates appetite.
We recommend these articles about what causes the munchies, too: