A fan pulls in air from the surrounding area, which typically has high moisture levels.
When the air passed through the dehumidifier , it touches the cooling coils , which in turn pull moisture from the air by lowering temperature.
The planet Earth itself is considered to be a closed system because there is a limit to the amount of matter that is exchanged. However, there are open systems that are ON Earth.
4.88x10^20 H2O2 molecules