It's a bit simpler than that. Like metering, the camera's auto WB function considers the scene. In a scene with purple clothing dominating the center of the image, the camera tries to neutralize that color by making it cooler - and it turns out blue. In the scene where white or other neutral colors dominate the center of the image, the camera's auto WB calculation tries to make that area neutral - and as a result purple turns out okay.
As Pete described, a typical image has many different sources of light at different color temperatures. A scene may also have many different colors and color temperatures. So the camera does its best to guess on which one is correct, but it does not really know. And you might have a scene with areas of the image that have two different color temperatures. If you have two different color temperatures of light, the only option is to correct color in PP.
The added issue is correct WB may not be neutral. We have warm light at the golden hours. You have warm sunsets. Candles give off a warm glow. And ice is a cool color. So even if you neutralize the light in these situations, your image may not be a correct representation of what you saw. A neutral WB gives you a starting point, but may not always be the answer.
Purple showing up as blue is a very typical WB issue. If you are using auto WB it happens. Pinks, some reds, and even some blues have this problem and require extra care or post processing.
Fellow moderator Scott Chapin photographs a lot of marching bands. He was the one who showed me the Live View trick and it works like a charm. There are more precise methods, but it gets you very close to correct WB with minimal effort.
In this case you have to set WB for correct rendering of purple uniforms and whatever it means to the rest of the image is probably not a big issue.