Because I'm not sure. Maybe to create a safe swimming area so boats don't get too close? But the barrier must go down below the surface because the water is more still in this area.
-------
Update! @jgpittenger says, "They are pilings and log booms attached to block free floating logs carried by the tides from banging into the marina."