Reason 1: Generalized Algebra
Note that $f(x)=g(x) \implies f(x)-g(x)=0 \implies h(x)=0$
General techniques to solving equations can be cast into the form $h(x)=0$ where we move everything to the LHS and call it "$h(x)$"
Reason 2: Factorizing
Note that, within sufficiently nice mathematical structures (like the real numbers you are probably used to), we have that $f(x)g(x)=0$ implies that either $f(x)=0$, $g(x)=0$, or both. This does not hold true if we replace $0$ with any other constant. This comes down to $0$ being the unique multiplicative identity constant, i.e. $a\cdot b = b$ only when $b=0$.
Reason 3: Finding Extrema
In Calculus you learn that we can find the minima and maxima of functions by finding points where $f'(x)=0$. Recall that a line of slope $0$ is "flat", and note that a function is not changing much where it is "flat".