If you're shooting, or dumping burning oil on your enemy, or even throwing rocks at them, being a bit higher than they are is a significant advantage, if for no other reason than the fact that you can see them better than they can see you. It's like the high ground in land battles.
This is in Napoleonic times, where naval warfare relied on broadsides of cannons. Stability is a far more important factor here. Also note that 4-decker ships, with a nominal advantage in firepower, were employed by the Spanish but eschewed by the Royal Navy for the same reason.