Whats the purpose of having spicy heat receptors on our buttholes?

When you eat spicy enough food you can feel it the next day, why is this something the body does? We don't have the same sensations for sweet food or any other flavours, what possible purpose is there for the body to evolve this annoying ability?