In this context I am talking about physical suffering, like the pain that you felt in the surgery room……… most organism wouldn’t have felt any pain, in order to have a selective benefit you don’t need to feel conscious pain (complex mechanism) all you need is to react and avoid pain (simple mechanism) … Natural Selection is unlikely to select complex useless mechanisms over simple and useful mechanisms
Pain tells us when there is something damaging our body, and we evolved suffering as an aversion to pain so that we were more likely to avoid situations that could kill or seriously harm us in order to survive longer and increase our chances of reproductive success.
It is a fairly simple mechanism, I think, although evolution is certainly not beyond developing needless complexity. If a mutation does not prevent an organism from producing fertile offspring, then it doesn't matter how pointless or harmful that mutation is. It will still get passed on, and it will mutate even further after enough generations.
Mutation isn't "random," because it follows fairly well-understood natural laws, but it can be hard to predict and not all mutations are adaptive. There are maladptive and neutral mutations. It's just that the species who manage to survive and reproduce tend to be better at surviving and reproducing.