Damnit, Blutoski! I hate it when somebody beats me to it.
Basically, yeah, as he said. The majority of pathogens we are exposed to today are relatively recent problems in our evolutionary history. For the most part, we have evolved alongside parasites such as ticks, worms, fleas, fungi and filiarials. Bacterial infections are 'uncommon' when compared with these parasites.
The latter stages of chemicals released during cellular trauma irritate specific surface nerve cells to make them itch. Scratching the area affected can dislodge parasites, stimulate blood-flow to the area, remove foreign objects pushed out of the body, or release pus from a healing wound. Many animals respond to this through licking the wound or nibbling at it, often using antimicrobials in their saliva to help the process.
The 'dirty caveman' concept is one that's primarily in your head, I'm afraid. Animal immune systems (like our own) learn as they develop through the early years of life. We are unfortunately quite clean animals, and have immune systems that are less educated than if we happened to have a more varied interaction with our pathological environment as we grow up. Lesson - feed your kids dirt!
Athon