I know that the person sitting on the stone in the Firelink Shrine said I had to ring them but does anyone know exactly why?
The ringing of the bells serves a couple of purposes. First, it causes the giant at Sen's Fortress to open the front gate, allowing the Chosen Undead to ascend Sen's Fortress in an attempt to reach Anor Londo. In addition, the ringing of the bells wakes the Primordial Serpent, Kingseeker Frampt, who was previously heard snoring at Firelink Shrine.
While that technically answers the question of what happens when you ring the bells, the "why" from the narrative may be a little more straightforward: because it is part of the legend that the Chosen Undead would escape the asylum, ring the Bells of Awakening, and reach Anor Londo.