How are touch receptors that respond to pain helpful?

It alerts the body to possible dangers