I believe spicy foods kill certain types of gut parasites.
So at some point in our evolutionary history some weirdo who liked a bit of spice was born, burned the parasites out of their gut, and then with their increased health and no calories being stolen natural selection did the rest.