I would assume that this is because the database is restored from a full backup + applying of transaction logs. This means that the only changes that can be made to the database are those that come with the transaction logs.
Thus, things like removing the traces of replication or updating sys.database_files cannot happen, because in that case the database would go out of sync with the source. So these are operations that the RESTORE command performs in the recovery phase.