They are both used, and under normal cicumstances both are in sync.
It is used when deploying an application, you can deploy a migrations.php config file that contains additional migrations, and run "migrate:current" on the target server, which will use the difference between the config and the table to run the migrations, instead of the migration files that exist.