You could just have tied for hair too tight. Tying hair too tight is a significant factor to consider when you asking “why does my scalp hurt” because if there weren’t any itching or flakes or dandruff, then it could just be having your hair too tightly tied. When you tied your hair into a pony-tail or something similar, it’s literally pulling the hair in together, so naturally it hurts. If you have a rich thick hair, then the problem will be worse for you.
What if you didn’t tie it tightly and it still sore then? There is a theory that if you tied your hair loosely and it still hurts, the weight of the hair might instead be the culprit. When you bunch up a long hair together, it becomes pretty heavy. Although, it is not so heavy that it pulls to the degree that a tightly tied hair might do. Instead, the additional weight stresses your more sensitive hair follicles and causes the pain. There you have it then, try not to tie your hair for a few days, see if the pain went away.