The input and output schemas will remain in the mapper editor, even after the data flow lines are removed.This schema is called "Temporary schema".
The schema being in this state is displays as "Temporary schema" and is distinguished from a complete schemas exists with its corresponding data flow line connecting components.
Once the data flow line is restored the "Temporary schema" will become ordinal schemas.
The advantage of schemas in "Temporary schema" state is that the schema can be edited without being connected to components.
Mappers whose schemas do not become "Temporary schema" state after the removal of data flow lines are variable mappers and merge mappers. Schemas are deleted from these mappers when data flow lines are removed.
Also, if you want to edit the schema before setting a data flow, you can manually set a temporary schema.
Select [Set temporary schema] from the right-click menu.