Why do you factor a quadratic equation before you solve?

There are two ways to solve a quadratic equation: one way is to factor it and another way is to apply the quadratic formula ($\frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}$). Factoring the equation into the form of $\left(x + a\right) \left(x + b\right)$ where a and b are constants gives the two roots of the equation to be $a$ and $b$. However, when the solution to a quadratic equation is not a rational number (that is, it can not be factored), the quadratic formula is the only way to solve it.