That's sailors'lingo, though the first ditty bag mentioned in print, circa 1860, is stocked with tools for sewing, not shaving . ( The " ditty " is obscure, and apparently not linked to the word for a song . ) The English still use a sponge bag, though it probably doesn't hold the washing-sponge it was named for.
परिभाषा
a waterproof bag for holding bathrooms items (soap and toothpaste etc.) when you are travelling पर्याय: toilet bag,