Why do we add Resistors on differential op. amp
The resistor values don't have to be the matched. That being said, the formula that defines the gain won't simplify into the expression that was posted in the question.



If the resistor values are unique, the formula is:

\$ V_{out} = \dfrac{(R_f + R_1)\cdot R_g}{(R_g + R_2)\cdot R_1} \cdot V_2 - \dfrac{R_f}{R_1} \cdot V_1 \$

Keeping the circuit balanced (matched resistor values) improves the CMRR, among other things.