In this scenario, it is critical that both the accounts are changed from a successful transaction and neither is affected from an unsuccessful one. Although this may sound like a fairly straightforward request, it is hard to make this work in a distributed system without deploying some form of transaction control - computers can fail and messages can be easily lost. Transactions provide a way to bundle a set of operations into an atomic execution unit. In short, within any transaction, several independent entities must agree before the deal is done. If any party disagrees, the deal is off and the independent entities are reverted back to their original state by invoking a rollover operation.
Transactions are essential for distributed applications.
Further, transactions provide modular execution, which complements a component technology's modular programming. A transaction either commits or rollbacks. If a transaction commits, all of its effects remain. If it rollbacks, then all of its effects are undone. A transaction always leads to a correct transformation of the system state by preserving the state invariance.