There could be multiple answers to this joke and one of the be that he said to the curtains that they should pull themselves together. Here we have a funny delivery originating from a play on words concerning the verb "pull" which means both to calm down and actually gather something together.