What is the motivation of definition of quadratic integer rings for $D=1\mod(4)$ I'm self-studying a ring theory and have a question. Why do we define a quadratic integer ring differently for the case $D=1\mod(4)$? Why don't we just say that $O_{Q[\sqrt{5}]}=\mathbb{Z}[\sqrt{5}]$ ?

This is because, if $D\equiv 1\mod 4$, $\mathbf Z[\sqrt D]$ is not the ring of algebraic integers in the extension field $\mathbf Q(\sqrt D)$. It is only contained in it. The algebraic integers in such an extension is:
$$\mathcal O_{\mathbf Q(\sqrt D)}=\mathbf Z\biggl[\frac{1+\sqrt D}2\biggr].$$
