Nah, people will still pull hair (and other less savory things) even when it’s culturally unacceptable. There’s always a delineation between what people are supposed to do (or their culture says they behave) and how we actually behave. Some knights did actually follow the Code of Chivalry (including the part that involves suicide for failure), but most didn’t. The same is actually true for the samurai, because killing your most experienced and well-trained warriors for screwing up just isn’t cost effective in the long run.
There’s a similar truth to be had with the hair and high heels (and Beka Cooper’s gorget). In European tradition, there are essentially two different strains of thought, one comes out of the Northern Germanic tribes and their willingness to wear long hair because it’s a very good insulator. It had nothing to do with combat and everything to do with comfort. The short hair tradition comes from the Romans, where having short hair was an indicator of military service. Outside of military service, male or female they didn’t care, but for combat you had to crop it. While it’s become a gender difference now, short hair once meant (and still does mean) combat professional/warrior/military for Europe. Long hair can be worn by those, such as officers and others who are unlikely to see combat. Even today in the American military, men and women must both have hair that doesn’t touch the collar because it’s the most effective method available.
On the Eastern side, such as in China and Japan, they tied their hair up before going into combat, often in some form of bun and then wore a helmet over it. This is the second most effective method of preventing your hair from being used against you as a weapon. It’s a simple, easy, and readily available solution to the problem.
It doesn’t have to be complicated, it’s actually very easy. Now, wearing spikes in your hair is, ultimately, going to be more dangerous to you in the long run than it is to whoever is planning on attacking you. It’s essentially an unnecessary fashion accessory for a problem that could be solved easily by Beka just wearing her hair short (in testimony to European combat tradition for lower class personnel) or hiding it down her collar (like you already suggested). Now, the gorget justification surprised me because I remember Beka Cooper essentially working as a constable in the slums of Tortall’s capital city and that’s a very expensive piece of equipment to gift someone who has the life expectancy of a mayfly. The gorget was originally worn by women in the middle ages as a piece of linen worn around the throat, it later became a steel or leather neck protector between the backplate and breastplate of platemail. In the renaissance, they were larger and extended down the front and back to protect the heart. Usually, it would be gifted as part of the military uniform for heavy armor units. The guards at the Tower of London, for example, traditionally wear gorgets as part of their uniform. It’s a very prestigious position which puts them ahead of the general rank and file. A constable is on the low end of the equipment pay scale, a constable working the slums isn’t going to rank high for the best equipment.
The reason for this is not because the slums are less important, but that upon the death of an officer you have a greater chance of losing their equipment to the local thugs. An officer wandering around in expensive equipment becomes both a target for the local criminal element to take down (like a juicy duck being led to the slaughter) because they can sell that equipment and makes it harder for the officer to identify with the rest of the locals who live in the neighborhood (who they need to be able to do their job). In a sense, you want the uniform to distance the officer from the locals, but not so much that it sets them apart into a visibly different social class. Stomping around the slums in fancy armor is just a reminder to them that your character thinks that they’re better, more reason for there to be resentment, and the faster the character will die because no one is going to step in to help them when things go south. The last thing an authority wants is their enforcement group fully relegated to the status of Other by their own people. When the people view the enforcers as Other, the enforcers will often come to view them as Other, which essentially leads to Martial Law or the quote from Commander Adama in the BSG reboot about why you never want to put the military in charge of policing your civilians. (Hint: It has something to do with the military being trained to fight enemies and the police being trained to protect the people, when the military become the police then the people become the enemy.)
If Beka received her gear because of her special relation with the Provost, then that just sets her apart from the other cops and is likely to generate resentment over her special treatment. It also makes her a more likely target by the criminal element in the city (though she’s supposedly protected by the King of Thieves, but he can’t be everywhere and w/e for this example), who know that she would be a good target to loot. If all the cops in the city get gorgets, then that’s really a rather expensive proposition for the Magistrate that won’t be worthwhile in the long run because of the high likelihood of losing them to the city’s criminal element.
The spikes are dumb, there’s no way of getting around that and no number of justifications that are going to make it better regardless if what culture their from. It makes more sense to wear them as part of a hair net, but that’s still likely to get the character stuck in a wall or the hair caught on themselves. It ultimately leads to an unnecessary level of preparation for a character who is going to be constantly on call and need to be able to get ready quickly. A character in a culture with a reason for having long hair isn’t going to wear something in their hair that can tear it, because it’s counter productive.
I admire Tamora Pierce a great deal as an author, for forwarding the cause of female combatants, and for writing complex and realistic female protagonists in her work. This one just isn’t going to get better though and there isn’t much more we can say on the subject, so I’m going to call it here.