The purpose of scaffolding files is to allow Drupal sites to be fully
managed by Composer, and still allow individual asset files to be
placed in arbitrary locations.
From: https://github.com/drupal/core-composer-scaffold
The reason that default.settings.php
is copied across is that this file is not part of the Drupal core (the contents of /web/core
), nor is it part of a module, theme, or distribution. But it's part of a base Drupal installation, so Composer copies it to the correct location upon install.