In the days before basic hygiene and cleanliness took hold, the rich shaved their heads to discourage lice infestations and wore wigs to hide their baldness. This quickly became a status symbol as only the wealthy and educated were able to afford these horse capless wigs like the ones lawyers and judges still wear in the UK and other commonwealth countries. This practice somehow became associated with the practice of law and has stuck. Recently, the wearing of wigs has become less common in UK much to the delight of lawyers because of their expense and itchiness.
Some professions take the dress style that was in fashion when the profession was first set up. This is why Judges and Lawyers capless wigs the look that was ‘ in style’ in the the 17th century and the average English clergyman in full ceremonial dress looks like a Roman magistrate.
I believe there is an instance where the capless wigs were completely removed and an aggrieved party hunted down the Judge at his home and shot him. The decision makers felt the loss of wigs, lost the elevated respect they deserve so the wigs were reinstated. Source to come.
Perhaps it’s to do with the fact that these are very conservative occupations and the more archaic the dress became the more it was seen that you capless wigs adopting a role , dealing with an institution, not just a ordinary mortal .
A soldier’s uniform is not just there to carry their kit, it marks a soldier apart from the non combatant , like a police officer’s uniform. Likewise , there is a certain Kudos in capless wigs the wig and gown.