Why do addition and subtraction have the same precedence?

Addition and subtraction have the same precedence.

However, $$5 - 3 + 7\neq 5 - 10$$. Therefore, the subtraction must be done before the addition. Is there a concept that I am not grasping?

• Read left to right. It's $2+7=9$. – Randall Feb 11 '19 at 16:00
• The "solution" is to avoid subtarction and use only addition : $(5+(-3))+7=2+7=9$ and $5+((-3)+7)=5+4=9$. – Mauro ALLEGRANZA Feb 11 '19 at 16:06

For example, without a conventional order of operations, the expression $$1 + 2 \cdot 3 + 4$$ could be interpreted as $$(1+2) \cdot (3+4) \qquad\text{or}\qquad 1 + (2 \cdot (3+4)),$$ or any other permutation of parentheses. The problem is that this expression is ambiguous. The intended meaning can be made clear with the grouping: $$1 + 2 \cdot 3 + 4 = (1 + (2\cdot 3) + 4.$$ However, in order to save time, we would like to be able to write the thing on the left (i.e. the expression without parentheses). This is a priori ambiguous. The resolution of this ambiguity is the order of operations, which asserts that we should prioritize multiplication over addition. This choice of prioritization is essentially arbitrary: the order of operations is not a theorem, but a cultural convention among mathematicians.
There is a similar convention regarding subtraction (and division): subtraction is the "inverse" operation of addition. Hence subtracting 3 is really the same thing as adding $$-3$$. We then adopt the convention that $$5 - 3 + 7 = 5 + (-3) + 7 = 9.$$ We could ask why this shouldn't be interpreted as $$5 - (3+7);$$ this comes down to the already established order of operations: multiplication takes priority over addition, and we could easily interpret $$5 - 3 + 7 \qquad\text{as}\qquad 5 + (-1)\cdot 3 + 7,$$ so the negation applies only to the 3, and not to the term $$3+7$$. Again, this is a convention adopted by mathematicians in order to simplify notation and consistently deal with the ambiguities introduced by this simplification. Specifically, the convention here is that when two operations have the same priority, evaluation goes from left-to-right. Once again, this is a cultural norm among mathematicians and is a more-or-less arbitrary choice of possible interpretations which has been selected to eliminate ambiguity. Handling multiplication and division from left-to-right follows a similar convention (though the obelus ($$\div$$) is uncommon in mathematics, and you will generally see "division" written like a fraction).
They do have equal precedence. To be ultra-careful, read left to right: $$5-3+7 = (5-3)+7=9.$$ But, you don't have to, if you're careful. This is also $$5-3+7 = 5 + (-3+7)= 5 + 4=9.$$
Well, subtraction (as well as division) can be viewed as derived operation. If you have a ring $$R$$ such as the ring of integers, subtraction can be defined as $$a - b := a + (-b),$$ where $$-b$$ is the additive inverse of $$b$$, i.e., $$b + (-b) = 0$$, where $$0$$ is the zero element of the ring. Thus there is just one operation: addition.