Another way to say "a closet is for keeping old clothes" is "One purpose of a closet is to have a place for old clothes."