Good question, and the answer is not necessarily as simple as it seems.
Our aim is to identify the solution set for the given DE. For example, the set of functions $\{y(x) = x + C | C \in \mathbb{R}\}$ is the solution set for the DE $y' = 1$. So preferably, we'd like to have the simplest possible form for expressing that set (so we don't have to think about too many special cases). Also, note that while I'm explicitly writing it out as a set, we usually just write the generic example of a solution, so for this case we might just say that $y = x + C$ is the general solution to the DE.
What, then, is the solution set for the DE $y' = -y$? Well, depending on how you approach it, you might get to something like $\{y(x) = \pm e^{-x + C} | C \in \mathbb{R}\}$, at which point you might make the transformation $A = e^C$ and get the solution set $\{y(x) = Ae^{-x} | A \in \mathbb{R} \setminus\{0\}\}$, i.e. we're saying the general solution is $y = Ae^x$ where $A \neq 0$.
Why did you decide that $A$ can't be $0$? Because your solution set excluded it. But take another look. $y = 0$ is a solution to the DE. Therefore, we missed it as a possible solution (probably because we solved by dividing through by $y$ in the DE, so we implicitly dropped the possibility). So, for the DE $y' = -y$, the full solution set is $\{y(x) = Ae^{-x} | A \in \mathbb{R} \}$.
That won't always be the case - sometimes, the DE is formed so that the excluded solution really is excluded. But you need to check, and consider the possibility. It may relate to whether the DE is driven by a physical system - in which case you can exclude solutions that aren't physically possible.