I'm referring to the process shown in this video:
https://youtu.be/Quyr5R1Rbfw?t=20
Or this image from Wikipedia:
In it, a large warship is launched into the water by essentially dropping it sideways down some ramps and off of a pier. The ship rolls hard to one side, and then oscillates back to the other, making the process seem like a fairly risky one. For instance, if it rolls back towards the pier too aggressively it might strike the structure and cause damage both to the pier and the shiny new warship. Or if it rolls too far on the initial drop, the ship might capsize.
So my question is, what are the advantages of launching a large ship sideways like this, as opposed to, say, dropping or gently lowering it vertically into the water?