The idea here is to allow additional operations on the database during the process of creating databases for testing purposes--for example, see #23970 (comment).
In reality, these are probably interceptors in the Migrations pipeline, since that is what is used for EnsureCreated, but the use case is specifically for EnsureCreated since it does not allow for editing of the generated migrations.