Pain happens for a reason, but sometimes the reason is not a warning of anything that can be remedied.
If you break a bone, pain tells you not to put pressure on that bone. That is a useful thing.
If you have pain due to arthritis, eliminating the pain is not going to result in more arthritis or further harm.