You can't just add the balances and expect it to amount to the same as the spend. Consider this: you spend 0, 0, 0, 50. Your balances are 50, 50, 50, 0. Adding up the balances you get 150. What does this mean? Absolutely nothing.
The balance has no reason to add up to 50. So there is no extra anything. If you kept spending 1 each row, and then summed the balance at the end, it would be massively higher than the 50 you started with.
Summing a balance column is never correct. Take any example that doesn't end in a zero balance and it's easy to see that the balance column's sum is meaningless:
Data scientist here! What you have discovered is what's known in data analytics as a semi-additive measure. Instead of summing the balance column, you would count it, and get a measure that showed how many transactions took place, but not a balance. Of course, there's no reason to simply count the one column, a row count would suffice and return the same.
There's no reason to expect that the sum of the balances remaining would be equal to the initial amount. If you spend in 1$ increments, the balances would be 49, 48, 47,... which sum to much larger than 50. If you spend 49$ followed by 1$, right away, the balances sum to 1$, which is much less than 50. This particular example has been "cooked" to give a value of 51. You can cook up another example to give whatever value you want.
Remember in school when they made a big deal about the order of operations? This is why. It's not clear as to why, as you're not seeing the entire picture though, just some numbers.