- With the normal vector of the plane + a point on the plane : $$(\vec r - \vec a) \bullet \hat n = 0$$
In this second representation, it is not necessary for the normal vector to be a unit normal, so we can write $$(\vec r - \vec a) \cdot \vec n = 0$$ instead. So, we have $$\begin{pmatrix} x-a_1 \cr y-a_2 \cr z-a_3 \end{pmatrix}\cdot \begin{pmatrix} n_1 \cr n_2 \cr n_3.\end{pmatrix}=0,$$ in other words, $$n_1x+n_2y+n_3z-n_1a_1-n_2a_2-n_3a_3=0.$$ Letting \begin{align}A&=n_1\\B&=n_2\\C&=n_3\\D&=-n_1a_1-n_2a_2-n_3a_3,\end{align} the equation becomes $$Ax + By + Cz + D = 0.$$
P.S. The term $$-D$$ could well be a positive number; read the minus sign in front of $D$ not as an adjective/description ("$\require{cancel} \xcancel{\text{negative}} D$") but as a verb/operation ("minus $D$").
Addendum
So $D$ here is merely the negative of the distance $D?$ If so, why precisely is it taken as the negative as opposed to the positive? As in $Ax+By+Cz−d=0$ where $d$ is the perpendicular distance to the origin along the normal? Did it come about as the result of an agreed upon convention?
Read “-5” as “minus 5” instead of “negative 5”. If $D$ equals $(-7),$ then both $(-D)$ and $|D|$ are positive and equal $7.$ Prefixing a number with a minus sign flips its sign; on the other hand, taking the absolute value of a number converts any negative sign to positive.
Your first way of representing planes contains a typo: the equation is $\vec r \cdot\vec{\hat n} = d$ instead or $\vec a \cdot\vec{\hat n} = d.$ Here, $\hat n$ has unit length, and the plane's distance from the origin is $|d|$ instead of $d.$
Similarly, in your second way of representing planes, the plane's distance from the origin is actually $\frac{|D|}{\sqrt{A^2+B^2+C^2}}$ (the denominator equals $1$ if we've been using a unit normal).
To be clear: while the plane's distance from the origin is naturally nonnegative, $d$ and $D$ may be negative or zero or positive.
For example, the planes $x+2y+2z+9=0$ and $x+2y+2z-9=0$ are both $3$ units from the origin.
Why exactly is $\frac D{\sqrt{A^2+B^2+C^2}}$ taken to be the negative of $d?$ Why wasn't it taken to be the positive of $D?$ Is it just convention?
Notice that "the positive of $(-3)$" can be reasonably interpreted both as +3$+3$ and -3;$-3;$ "the negative of $(-3)$" is just as confusing.
I think you mean to ask why $D$ and $d$ have opposite signs. When you rewrite the plane's equation $$Ax + By + Cz + D = 0$$ as $$Ax + By + Cz = D_2$$ (neither equation is more conventional than the other), then $$\dfrac{D_2}{\sqrt{A^2+B^2+C^2}}=d=\dfrac{-D}{\sqrt{A^2+B^2+C^2}}.$$