Dogs don't understand the concept of underwear. They perceive the world through scent and behavior, so face-rubbing on panties usually comes down to a few common motivations.
Possible Reasons
Dogs are drawn to strong scents, and worn panties can carry body odor, perfume, or detergent smells that intrigue them. They may also do it to get attention, out of playfulness, or as a self-soothing behavior when anxious or stressed.
What You Can Do
Keep underwear out of reach if your dog is excessively interested. Consider whether stress or anxiety might be playing a role, and consult a veterinarian or certified animal behaviorist if you're concerned.
Observing your dog's behavior and seeking professional help when needed is always the best approach.