I understand the basic operations on elliptic curves (e.g. points on $y^2 = x^3+7$, point at infinity, addition, multiplication, etc.).
I also see how it can be used for cryptography, based on the fact that given $G$ and $K=k*G$, it's very difficult to inverse the multiplication and recover $k$.
But here is the question:
How did mathematicians first get the idea of looking at the points on such curves $y^2 = a x^3+b$, and above all, how did they get the idea of defining such an exotic addition? (i.e. drawing a line from $P_1$ and $P_2$, then take the intersetion with the curve, then reflect in the x-axis, why this?).
(I understand that with this definition, it allows to have an associative addition, and a group, but how did this appear?)
How did this suddenly appear as an interesting math object to study, with such a non-obvious addition?
The first constructions of points on curves of genus 1 can be found in the work of Diophantus, who taught how to find new rational solutions to certain equations by what much later was identified as the tangent method. Diophantus used clever (mainly linear) substitutions instead, as did Bachet, Fermat, Viete and Euler. Jacobi saw the connection between Euler's formulas and the theory of elliptic functions. The geometric interpretation of the linear substitutions as lines and the language of curves was first used by Sylvester, Lucas and Cayley. For more, see http://www.numdam.org/article/RHM_2002__8_1_67_0.pdf.
Perhaps it is fair to say that most problems in Diophantus that lead to rational points on curves of genus $1$ are not given directly in Weierstrass form, but rather consist in making quartics $ax^4 + bx^2 + c$ equal to a square or in solving "double equations", i.e., making two at most quadratic polynomials equal to a square simultaneously. For the equivalence to the modern formulation you may consult Weil's masterpiece on number theory from Hammurabi to Legendre.