There are seats built in the dugouts right next to the railing. They are literally designed for people to sit that close. Whether that's a good idea or not is another thing. Some of you are acting like the bench at the bottom is the only place to sit and players are just hanging out in areas that they shouldn't be.
I would think sitting way down in the dugout is actually more dangerous because you don't have a good view of the field and if a line drive was to come in there you probably wouldn't see it and then have no idea where it would ricochet off the wall. In fact, it may have happened, but I can't remember anyone ever get hit at the railing. It's always someone down in the dugout.