Were the rails more for the pit and to keep people from tripping in to it. You know, the whole "the most dangerous falls are from an inch or more (See also, the "Fatal Half Inch" work place safety video)?That shot right there really drives home how inefficient the railings on the bridge were (for the original series, anyway). Clearly they were made so that actors in the "pit" area could comfortably spread their arms upon them (for dramatic posing). But they were useless from a real life perspective, an outright "kneecapping" hazard for anybody standing upon the upper ring.
It's probably meant as a control aspect and promote situational awareness for starship captains. No one can immediately run up and assault the captain (easily, any way), and those approaching in the pit would give ample warning prior to entering that zone.Beyond a purely cinematic aspect in the real world, I've often wondered what the "in universe" reason was for the "pit". True, it looks cool and a StarFleet bridge just seems "off" without it, but what's the function "in story"?