There are really two questions here 1. Why do humans use spices? and 2. Why do some humans eat excessive amounts of this particular capsaicin but not other spices, or only a few others?
I will answer the second question first. The current understanding of why some humans eat so much spicy food is that it is a form of benign masochism. "Some" is the key: only some humans like spicy food in anything but the most minimal amounts. It has been shown that eating spicy food releases endorphins, but only after the burn, so eating spicy food is like going to a scary movie or riding a rollercoaster — initial discomfort followed by a rush. Humans are the only animals that do these things because we know they are not dangerous. It is thrill-seeking.
Now this is not the entire story. Spices in general have their own origins. Many spices inhibit bacteria, and capsaicin appears to do so as well. This alone could be the reason people started using it more widely. We see that more spices are used in warmer climates, the same places where spoilage would be the biggest risk. We also see more use of the spices with the highest inhibitory properties. Interestingly humans may not be the only animals to spice food in this way; bears and bees are both known to mix antibacterial plants into stored food.
Additionally small amounts of many spices, even capsaicin, can improve flavor without generating the burn. This is probably the least understood aspect, but some believe it may be linked to simulating the flavor of better-quality organ meats or increasing bioavailability of some nutrients.
Lastly it has been shown that capsaicin in particular can actually trick the body into cooling itself off even when it would not do so normally. Your body responds to the false signal of heat by cooling itself, which could be a benefit in hotter climates.