Trial balance is necessary to ensure that the total of all debit balances are equals to the total of all credit balances, verifying the accuracy of the bookkeeping entries.