When SQL Server starts up, it runs a recovery process for every database to ensure they are transactionally consistent. It rolls forward committed transactions and rolls back uncommitted ones found in the log.