The same answer to why anything about the body is the way that it is.
It was not an evolutionarily beneficial trait.
If pain receptors in the brain ever evolved in our ancestors, they did not aid in survival or reproduction, and lost out to members of the species that evolved more useful mutations/traits.
There is no why anything does what it does, only “does it help me survive and make babies? if so, my babies will have that, too.”
Latest Answers