Let $(M,g)$ be a non-complete Riemannian manifold. Assume $p,q,r\in M$ satsify: $d(p,q)=d(p,r)+d(r,q)$, where $d$ is the Riemann distance function induced by the metric $g$. I am trying to find the most general assumptions which imply existence of a length minimizing geodesic between $p,q$ which passes through $r$.
Partial Results:
A necessary & sufficient condition: There exist (normalized) minimizing geodesics $\alpha,\beta$ from $p$ to $r$ and from $r$ to $q$.
Sufficiency:
Look at the concatenation $\gamma = \beta * \alpha $. Then $L(\gamma)=L(\alpha)+L(\beta)=d(p,r)+d(r,q)=d(p,q)$, so $\gamma$ is a piecewise smooth minimizing path, hence it is a geodesic which passes through $r$. (by corollary 3.9 page 73 do-Carmo Riemannian Geometry).
In particular, if the manifold is complete the answer is positive.
Necessity: Follows since for any minimizing geodesic, any sub-segment of it is also minimizing.
In particular, this means that the assertion is false for $\mathbb{R}^2\backslash{(0,0)}$.
Are there any non-complete manifodls for which it is true?
Yes, there are non-complete manifolds for which this is true. Any convex proper open subset of $\mathbb R^n$ with its Euclidean metric, for example.
The condition that there exists a minimizing geodesic between any two points in $M$ is called geodesic convexity.