They put a marble in Ramune Soda to create a seal to keep carbonation inside the bottle, which also gives the soft drink a longer shelf life. Hiram Codd invented this technique in 1872.
Unlike a traditional bottle of soda, the marble is used like a cap that serves to keep your soda fizzy as both the marble and bottle are made of glass which is not permeable (it retains carbonation)