Actually, I think the diaper was invented first. Or, maybe, it's because poorly tanned hard leather was chaffing, so a nice, soft undercloth was invented for comfort's sake. And I can only wonder what those poor Medieval Knights were dealing with... heavy cold iron with joints that pinch... *shudder*. I'd want all my various dangling parts as close to my body as possible.