The bar is the railing that separates the audience area (called the gallery) from the area with the attorney's tables (called the well). So the people who are allowed past the bar became known as "the bar", just like how judges (who sit at the desk at the front of the courtroom called the bench) became known collectively as "the bench". "Passing the bar" has both a literal and figurative meaning. Literal being that the person passed a test called the bar exam, but also figuratively being that they are now permitted to pass the bar in the courtroom.
AFAIK, the concept of the bar started with the British Accreditation Registry
To add on, laser is also an acronym but no one writes it in caps. Sometimes it's best to follow conventions.
I didn't even mean to imply it was an acronym. Everyone knows it's called the bar; no one knows why. I just randomly use capslock on my phone.
The bar is the railing that separates the audience area (called the gallery) from the area with the attorney's tables (called the well). So the people who are allowed past the bar became known as "the bar", just like how judges (who sit at the desk at the front of the courtroom called the bench) became known collectively as "the bench". "Passing the bar" has both a literal and figurative meaning. Literal being that the person passed a test called the bar exam, but also figuratively being that they are now permitted to pass the bar in the courtroom.