A remarkable mystery of the copper oxide high-transition-temperature superconductors is the dependence of Tc on the number of CuO2 layers, n, in the unit cell of a crystal. In a given family of these superconductors, Tc rises with the number of layers, reaching a peak at n=3, and then declines: the result is a bell-shaped curve. Despite the ubiquity of this phenomenon, it is still poorly understood and attention has instead been mainly focused on the properties of a single CuO2 plane. I will show that the quantum tunneling of Cooper pairs between the layers simply and naturally explains the experimental results, when combined with the recently quantified charge imbalance of the layers and the latest notion of a competing order nucleated by this charge imbalance that suppresses superconductivity. The implication of the result will be also discussed: if materials can be engineered so as to minimize the charge imbalance as n increases, Tc can be raised further.