I have an equation $x^2 -x =0$
I know, it has two solutions, $x=0,1$
If I plot it using a math software, it shows a straight line passing through $1$, perpendicular to x-axis. (I have plotted, $x^2-x=0$)
BUT, if I plot $y=x^2-x$ , then it does show a parabola that passes through both $0$ and $1$ .
The question- What's the reason behind this?

How can you "plot" the equation $x^2-x=0$? It is an equation in a single variable. The "plot" of that would be the two points $0$ and $1$ on the real number line. There is no $x$-$y$ plane involved. What math software are you using?
Addendum: (Thanks to the comment of @DylanSp) If $x_0$ is a solution to the equation $x^2-x=0$, then of course $(x_0,y)$ is a solution of the equation (regarded as an equation in two variables) for every value of $y$ because the equation places no restriction on $y$. The set of points of the form $(0,y)$ or $(1,y)$ is the union of the two vertical lines $x=0$ and $x=1$ in the plane.