I haven't used ledger, but it seems to be double entry accounting too. According to the example:
2015/10/12 Exxon
Expenses:Auto:Gas $10.00
Liabilities:MasterCard $-10.00
whereas I would have something like: 2015/10/12 Exxon $10.00 MasterCard -> Gas
The idea would be that the form of the transaction doesn't allow you to screw up - it is neccessarily balanced because you only give the amount once. A bit like a typed language only allows well-formed programs to run.