Erika and Friedrich are forced to hide from the Nazis in the cupboard. This is in direct response to the terrible news that the Germans are planning to round up all old people and children under the age of ten in the ghetto and deport them. No one knows exactly where they will be taken, but the rumors are that it will be Chelmno, an extermination camp in Poland.
That night, Daniel's family has an urgent meeting in their apartment. Mother believes that the Nazis will take Erika, as she's very weak. It's clear from the deportation announcement that only those capable of working as slaves for the Nazis will be allowed to survive—for now. That inevitably rules out Erika, who despite her strong appearance is actually quite weak, as we've seen.
Out of desperation, Daniel's father suggests that they can hide two children in the cupboard to stop them from being taken by the Nazis. He acknowledges that it'll be quite dangerous, what with there being little air inside, but under the circumstances, it's the only option available.
Eventually, it's decided that Erika and Friedrich will hide in the cupboard. Although Gertrude and Brigitte are small enough to fit in, they're too young and will get scared easily—and if they were to start crying, then the police would be likely to hear them and discover their secret hiding place.
Once Erika and Friedrich have been helped into the little cupboard, the handle is taken off the door and tape placed over it. Then a bed is placed in front of the cupboard door and covered with a large comforter. This is to muffle any sounds coming from the cupboard, in addition to making it more difficult to find.