That's how they get bubbles in bottles.
correction - beer develops carbonation during conditioning (add 1/2 cup corn sugar, boiled in 2 cups water and cooled, to 5 gallons of fermented beer).
Bottling beer that is still fermenting WILL result in exploding beer bottles!