Why do debits equal credits?

In double entry accounting system any transaction should be equal for both debit as well as credit side to be recorded otherwise no business transaction can be recorded. This assures the basic accounting equation as well.