What line 5 says is:
1. Take variable a
2. Subtract 1 from it
3. Store whatever that number is into a.
So basically the reason that a does not equal 10 at the end of your program is because it is being overwritten each time by line 5 in the code block above.