To prevent someone's entrance or exit. This is what it means to bar and so regular and universal is this desire that the word has seeped into the instruments used for effecting this control. The most common being the rigid cylinder and this we still call a bar even when not being used for its namesake, such as when its used in construction or even to save lives like the inanimate carbon bar that saved all three astronauts aboard the Space Shuttle Corvair's disastrous 1994 mission.
Important to note when dwelling upon bars is that though they cannot be passed they can be seen through, as if to be barred from something only has meaning if the person confined is still permitted to see what they are missing, and in this the bars we have discussed are alike their namesake: Walls high enough to stop people from walking but short enough to be seen over. This includes the room length bar used to separate the public from the performers at court, and so ingrained is the use of this largely symbolic barrier that the entire profession that works behind it has taken it to be their sigil. Lawyers must be members of a bar to pass beyond the bar, and to be disbarred is to be barred from that bar. The punishment for violating these rules is to be put behind bars.