I used to hear it all the time when I was a kid. The instruction is burned into my memory and habits. Always, always wear clean underwear. I don't really know why, (beyond the hygiene issue) but I'm convinced this is still excellent advice. I know when I was growing up, the thought process was "What if you get in an accident and have to go to the hospital?!" Scary thought, I know. But let me reassure you, if you ever get in an accident and have to go to the hospital, your underwear will be the least of your concerns. I'm also fairly confident the condition of your underwear will not be an immediate issue for the health professionals who are caring for you. Unless they are cutting them off your body.
One of your relatives (who shall remain nameless) actually carries and "old pair" of underwear with her when she travels via airplane. Just before she lands at her destination, she changes her underwear and throws the old pair in the garbage. Although I find this a bit extreme I have to give credit to the organization and pre-planning that is required to make this happen. She will not be found ill-prepared for any unforseen emergency.
Regardless of the reason, it's still a good habit. The older you get, the more you'll understand. In the meantime, just trust me.
NOTE: FYI -- I HATE the word "panties." I don't know why... just do. Please don't use it in my presence.