Drupal 9 install not importing modules optional configuration
I had an issue with running site-install on a Drupal 9 site where the exported views in the config/optional directory were not being imported.
After some diagnosis, the reason is that there was a change and now the optional config is imported before the install profile is activated - See change record - https://www.drupal.org/node/3118908
My problem was there were user roles in the config/install of the profile that the exported views depended on.