Here: https://en.wikipedia.org/wiki/Imaginary_hyperelliptic_curve#The_divisor_and_the_Jacobian it says:
"Actually, Bézout's theorem states that a straight line and a hyperelliptic curve of genus $2$ intersect in $5$ points. So, a straight line through two point lying on $C$ does not have a unique third intersection point, it has three other intersection points."
However in the same page, Figure 2 has , let's say a "curved line" that intersects the elliptic curve on 6 points. How can this happen? I am not seeing why the "curved line" does not fulfill the above paragraph....
P.S.: I know there are other questions related on HECC in the current site, but I am asking something very specific, not mentioned before, the way I put it.
The short answer: The "curved line" is not a straight line.
The longer answer: It may be useful to have an explicit situation, where we add reduced divisors. Let us consider the Example from the linked wiki page. $$ (C)\ :\qquad y^2 =x(x+1)(x+3)(x-3)(x-5)\ . $$ Consider the points $P,Q,R,S$, and the reduced divisors $D_1,D_2$: $$ \begin{aligned} P &= (1, 8)\ , \\ Q &= (3, 0)\ ,\\ R &= (5, 0)\ ,\\ S &= (0, 0)\ ,\\[3mm] D_1 &= P+Q-2O\ ,&&\text{Mumford representation:} & ((x-1)(x-3),&\ -4(x-3)\ ,\\ D_2 &= R+S-2O\ ,&&\text{Mumford representation:} & (x(x-5),&\ 0)\ . \end{aligned} $$ (There is no $[P]$ notation to pass from geometry, a point $P$, to a linearized object, $[P]$, a divisor. It should be clear from the context.)
It turns out that the sum $D=D_1+D_2$ is the divisor with the Mumford representation $$ (x^2 - 8x+3, \ -12x)\ . $$ So if we want to represent it as $T+U-2O$, we have to take the roots of $x^2-8x+3$, which are $4\pm s$ with $s=\sqrt {13}$ for an easy typing, and so we get the points $T,U$ equal to $(4\pm s,\ 12(4\pm s))$. Details follow.
The cubic that passes through $P, Q, R, S$, is $$ a(x) := x(x-3)(x-5)\ . $$ Consider now the cubic $(C')$ with equation: $$ (C')\ :\qquad y = a(x) = x(x-3)(x-5)\ . $$ We intersect now the cubic $(C')$, $y=a(x)$, with the given hyperelliptic curve of genus two, $y^2 =f(x)$. Intersecting means solving the system with two equations, those for $(C')$ and $(C)$, with two unknowns ($x,y$, the ones that parametrize our affine piece of geometry): $$ \left\{ \begin{aligned} y &= a(x)\ ,\\ y^2 &= f(x)\ . \end{aligned} \right. $$
How many solutions do we have?
This is more or less your question. (I found it easier to understand the situation in a sample case like the chosen one.) Well, we take $y=a(x)$ from the one equation, substitute it in the second one, and obtain one equation in $x$, which is $a(x)^2 =f(x)$, in our case: $$ x^2(x-3)^2(x-5)^2 = x(x+1)(x+3)(x-3)(x-5)\ . $$ We move everything on the L.H.S. - factors are transparent, and we know that
$P,Q,R,S$ (i.e. their $x$-component) should be among the roots: $$ \begin{aligned} a(x)^2 - f(x) &= x^2(x-3)^2(x-5)^2 - x(x+1)(x+3)(x-3)(x-5) \\ &= x(x-3)(x-5)\Big( (x^3 - 8x^2 + 15x)- (x^2 + 4x+3)\Big) \\ &=x(x-3)(x-5)\cdot(x^3 -9x^2 +11x-3)\qquad\text{(and $(x-1)$ from $P$ is a factor)} \\ &=x(x-3)(x-5)\cdot(x-1)(x^2-8x+3)\ . \end{aligned} $$
A plot of $(C)$ and $(C')$, with expected shapes, and their intersection points follows.
(The points $P,Q,R,S$ we start with are green, the "new" points $T,U$ are painted magenta.)
Sage code producing the figure:
And let now show $g$ with the default viewer... (Type
gfor instance in the interpreter.)