Problem/Motivation
#2156401: Write install_profile value to configuration and only to settings.php if it is writeable changed from always writing the install profile to configuration, and only to settings.php if settings.php is writable.
Change record is here: https://www.drupal.org/node/2538996
However this leaves a relatively annoying issue when re-installing Drupal.
Steps to reproduce:
1. Install minimal profile
2. Drop the database, try to reinstall with Standard (doesn't matter if this is via drush or the UI)
3. You'll see an error message about the install profile in settings.php not matching the chosen profile.
Proposed resolution
Completely stop writing the install profile to settings.php regardless of whether it's writable or not.
Remaining tasks
User interface changes
API changes
We'e already deprecated getting the install profile from settings.php and accepted it won't always be available there for new sites where settings.php is read-only. Given this change will also only affect new sites, it should not in practice break bc that anyone is relying on at this point.