Why did my computer turn off/suspend when the battery got to 10%?
When the charge level of the battery gets too low, your computer will automatically suspend. It does this to make sure that the battery doesn't completely discharge, since this is bad for the battery. If the battery just ran out, the computer wouldn't have time to shut down properly either.
You can change what happens when the battery level gets too low by clicking the battery menu in the menu bar and selecting Power Settings. Look at the When power is critically low setting. You can choose for the computer to suspend, hibernate or shut down. If you choose shut down, your applications and documents will not be saved before the computer turns off.
Some computers have problems suspending, and may not be able to recover the applications and documents you had open when you turn on the computer again. In this case, it is possible that you could lose some of your work if you didn't save it before the computer suspended. You may be able to fix problems with suspend though.