A long comment that may describe enough of what DSolve[] is doing to be considered an answer:
I'll use a set of related examples in which the questionably "spurious" solution is nontrivial:
(* 1. Reduced diff.eq. *)
DSolve[(y''[x] + y[x]) == 0, y[x], x]
(* {{y[x] -> C[1] Cos[x] + C[2] Sin[x]}} *)
(* 2. With extra factor *)
DSolve[(y[x] - Cos[x]) (y''[x] + y[x]) == 0, y[x], x]
(* {{y[x] -> Cos[x]},
{y[x] -> C[1] Cos[x] + C[2] Sin[x]}} *)
(* 3. With extra factor and sing.sol. *)
DSolve[(y[x] - Cos[x]) (y''[x] + y[x]) == 0, y[x], x,
IncludeSingularSolutions -> True]
(* {{y[x] -> Cos[x]},
{y[x] -> C[1] Cos[x] + C[2] Sin[x]},
{y[x] -> Cos[x]}} *)
(* 4. Just the algebraic factor *)
DSolve[(y[x] - Cos[x]) == 0, y[x], x]
(* {{y[x] -> Cos[x]}} *)
(* 5. Two DE factors, solns. of one contained in the other *)
DSolve[(y'''[x] + y'[x]) (y''[x] + y[x]) == 0, y[x], x]
(* {{y[x] -> C[3] - C[2] Cos[x] + C[1] Sin[x]},
{y[x] -> C[1] Cos[x] + C[2] Sin[x]}} *)
(* 6. Repeated factors *)
DSolve[(y''[x] + y[x])^2 == 0, y[x], x]
(* {{y[x] -> C[1] Cos[x] + C[2] Sin[x]}} *)
DSolve[(y[x] - Cos[x])^2 (y''[x] + y[x]) == 0, y[x], x]
(* {{y[x] -> Cos[x]},
{y[x] -> C[1] Cos[x] + C[2] Sin[x]}} *)
DSolve[(y[x] - Cos[x])^2 == 0, y[x], x]
(* {{y[x] -> Cos[x]},
{y[x] -> Cos[x]}} *)
There are a couple things to discuss here: (1) What DSolve[] does with an algebriac (zeroth differential order) factor of an equation; and (2) what it does when IncludeSingularSolutions points to True.
Recently (I forget which version), DSolve[] no longer balks at zero-order equations, as can be seen in examples 2, 3, and 4. I infer it does not check whether the solutions of the algebraic equation can be expressed by the general solution(s) to the other factor(s). Indeed, example 5 shows that it does not compare solutions of distinct differential equation factors. Example 6 shows that repeated factors that include a DE are not solved with multiplicity, whereas the equation that has only a repeated algebraic factor is solved with multiplicity. Probably Solve[] is used on it. That's what DSolve[] seems to do when equations have factors.
I infer that IncludeSingularSolutions -> True invokes a separate process, whose solutions are included in addition to the ones obtained from the given equation. As with separate factors, DSolve[] does not check the singular solutions produced against the solutions produced from its normal method. DSolve[] (AFAIK) considers two types of "singular solutions", the classical solutions, Solve[NestList[D[#, p] &, F[x, y, p] == 0, 1], y], where F[x, y, p] == 0 is the given ODE, and limits of the general solutions (as the C[] parameters approach infinity as well as they approach zero; but not other limits, I think, so some solutions may be missed). The "extra" singular solution y[x] -> 0 in the OP is of the first type. It occurs, as @azerbajdzan and @A.Kato have observed, because of the y[x]^2 factor in F[x, y[x], y'[x]] corresponding to the ODE in the OP.
14.3.0returns just oney[x]->0. If you factor yourodeyou will seey[x]^2as its factor. So it is a double root and that is probably why your version returns it twice which in later version was corrected. $\endgroup$init.m? $\endgroup$DSolve[y[x] (y'[x] - 1) == 0, y[x], x, IncludeSingularSolutions -> True]. $\endgroup$