Hibernate persistent objects are keep synchronize with database while the session is remain open. But the data will not commit to the database unless we call session.flush() or committing transaction.
Hibernate tracks all persistent objects and it call update statements only for updated objects. This process of monitoring persistence objects and updating only modified object is called automatic dirty checking.
This process is leads to improve performance of updating database.