People think bodies are somehow super smart, not really they evolved to be just smart enough.
That means in certain situations the body will do good short term but bad long term.
Example you damaged the achilies tendon, body inflames region, short term good promotes healing and pain makes us reduce activity, long term bad because some cells will see the strain and inflamation and through some complicated process start to calcify and you get bone spurs into the tendon over time.
Now this is an extreme example that happens over years but you get the idea.
Latest Answers