On a smooth projective surface, the intersection number of two divisors $C,D$ may be defined as $\chi(O)\chi(O(C))\chi(O(D))+\chi(O(C+D))$ (Hartshorne, ex. V.1.1). Bilinearity of the intersection number translates to the formula $\sum_{I\subset\{1,2,3\}}(1)^{I}\chi(O(\sum_{i\in I}C_i))=0$ which is somewhat similar to the theorem of the cube in the form $\bigotimes_{I\subset\{1,2,3\}}m_I^*\mathcal L^{(1)^{I}}\cong O$. Is this just a coincidence, or is there any deeper reason for this similarity?

The reason for both is that the third derivative of a (nonhomogeneous) quadratic function is zero. $\chi(O(D))$ on a surface is a quadratic function of $D$, by RiemannRoch. Theorem of cube on an abelian variety is another face of the fact that the Riemann theta funciton $$\theta(z,\tau)=\sum_m \exp(2\pi i(m^2\tau/2+ mz))$$ written as a sum of eigenfunctions $\sum_m c_m q^m$, $q=\exp(2\pi i z)$, has coefficients $c_m$ which are multiplicatively quadratic in $m$. 

