Holomorphic line bundles are algebraic on compact Riemann surfaces By looking at Griffiths-Harris book one can see that for a compact Riemann surface $X$ we have that:
$$\operatorname{Div }(X) /\mathcal M(X)^\times\cong \operatorname{hPic }(X)$$
where $\mathcal M$ is the sheaf of meromorphic functions, and $\operatorname{hPic }(X)$ is the group of holomorphic line bundles on $X$ up to isomorphism.
But since $M(X)=K(X)$, the above isomorphism implies that $\operatorname{hPic }(X)\cong \operatorname{Pic }(X)$. In other words any holomorphic line bundle on $X$ is algebraic! Isn't this a bit counterintuitive? Where is my mistake?
 A: You have made no mistake: every line bundle on a compact Riemann surface is indeed algebraic. 
Broadly speaking this results from the GAGA principle, named after Serre's celebrated article Géométrie algébrique et géométrie analytique.
However there are some subtleties that I will now address:  
1) Every compact Riemann surface can be holomorphically embedded into some projective space $\mathbb P^N(\mathbb C)$: this is a difficult theorem,  using Analysis in an essential way !
For a proof, see for example Theorem 17.22, page 144 of Forster's fine book Lectures on Riemann surfaces
2) Every holomorphic submanifold of $\mathbb P^N(\mathbb C)$ is in fact algebraic, i.e. is the zero locus of finitely many homogeneous polynomials in $N+1$ variables. This is Chow's theorem.
3) On a projective algebraic variety the map associating to a coherent algebraic sheaf its underlying holomorphic coherent sheaf is an equivalence of categories: this is Théorème 3, page 20 in Serre's GAGA article.
4) So this provides the required result, right?
Wrong! The subtle point is that the above theorem does not say that the equivalence above restricts to an equivalence between locally free sheaves!
However it is fortunately  true that locally free holomorphic sheaves come from locally free algebraic sheaves (cf. Proposition 18 in the article and the italic statement at the bottom of page 31 to which it reduces).
In particular it is true that $\operatorname{hPic }(X)\cong \operatorname{Pic }(X)$ and you were perfectly right all along. Bravo!
