The intersection pairing between two divisors on a nonsingular algebraic surface over a field is defined thanks to the following theorem (the reference is Hartshorne's book):

One can define a pairing for any couple of invertible sheaves $\mathcal L,\mathcal M\in\operatorname{Pic}(X)$ as follows:
$$\mathcal L.\mathcal M:=\chi(\mathcal O_X)-\chi(\mathcal L^{-1})-\mathcal (M^{-1})-\chi( \mathcal L^{-1}\otimes \mathcal M^{-1})\quad\quad (\ast)$$
By using the well known isomorphism between $\operatorname{Pic}(X)$ and the group of divisors up linear equivalence, one can clearly define:
$$C.D:=\mathcal O_X(C).\mathcal O_X(D)$$
and the final step is to show that this definition satisfies properties (1)-(4) of the above theorem.
So everything is very clear, but I don't understand what is the meaning of the definition $(\ast)$. It seems to me that this pairing for invertible sheaves appears out of the blue. Can you give any intuitive motivation about its nature? Why do we need the Poincare characteristics? Why are we taking the inverse sheaves?