Good theories, JohnPPotts - and it's true, phantom pain is partly due to the body image, your brain "expects" you to have all parts of your body present. However, in many cases, the person feels as if their limb is still present, so phantom pain could cause you to try and take weight on it rather than a warning to keep off it.
Also, you do not need chronic pain to develop a memory of what not to do. All of us have had many episodes of acute pain, and have learnt as a result not to touch hot things etc. However, only a minority have chronic (long term) pain.
In addition, chronic pain is also to do with nerves becoming over-responsive, so even normal movement can give rise to pain. Normal movement is just that - normal, so a phenomenon that stops us from doing normal things doesn't make sense. So why do we have chronic pain? Well, one theory is that man has always been a social animal and cared for old and infirm individuals. Inability to feel acute pain is a life-threatening problem, as it makes the individual prone to damage and infection - a huge evolutionary disadvantage. However, chronic pain is disabling rather than life-threatening; Stone Age man with long-term pain would have been cared for by other members of the group, so we havn't evolved a way out of it.
For anyone interested in pain and its mechanisms, "The challenge of pain", Ronald Melzack and Patrick Wall, is an absolute must. My copy's at work at the moment so I can't give publishers or years, but Melzack and Wall invented the Pain Gate theory in 1965 and know their stuff!