On $\mathbb R^2-(0,0)$ we define the following equivalence relation: Two points $(x,y)$ and $(x_0,y_0)$ in $\mathbb R^2-(0,0)$ are equivalent if there exists $a\in \mathbb R^*$ such that $$x=ax_0,\; y=ay_0$$
Let $D_{x_0y_0}$ be the line passing through the points $(0,0)$ and $(x_0,y_0)$. Then the equivalence class of $(x_0,y_0)\in \mathbb R^2-(0,0)$ is the set $D_{x_0y_0}-(0,0)$.
My question: I read that $\mathbb RP^1$ is the set of equivalence classes of points $(x,y)\in \mathbb R^2-(0,0)$ and this we just showed is the set of subsets $D_{xy}-(0,0)$. My question is why we say that $\mathbb RP^1$ is the set of lines $D_{xy}$ through the origin instead of saying the set of subsets $D_{xy}-(0,0)$ ?
There are many definition of $\mathbb{R}P^1$.
The definition you gave above is not the one where $\mathbb{R}P^1$ is the set of lines through the origin. The definition you provide above defined $\mathbb{R}P^1$ as the set of equivalence classes of $\mathbb{R}^2 - \{(0,0)\}$ under the equivalence relation you wrote.
However, your definition and the line-through-origin definition are the same in a very geometric sense. Let $\mathbb{R}P^1$ denote your eqivalence relation definition. Let $L$ denote the line through the origin definition. Let $\Phi : \mathbb{R}P^1 \rightarrow L$ be defined by $[x] \mapsto \mathbb{R} x$, where $\mathbb{R}[x] = \{\alpha x : \alpha \in \mathbb{R}\}$. It is easy to check that $\Phi$ is well-defined and a bijection.
So the equivalence class definition and the lines through the origin definition are equivalent by a bijection. (In fact if you put some topological structure on the two spaces you even get bijection preserving structure.)
However you are correct, the definition you provided, equivalence classes are not lines. But up to various structure preserving bijection, the two definitions are the same.