Origin of the quantum-critical transition in the bilayer Heisenberg model