Can unwashed underware give you an STD or an STI?

Yesterday I was at practice and someone mentioned that you were supposed to wash your underware after you buy it from the store or you can get an STD. 
Is this true? Could I possibly have an STD/STI because I have never washed my underware away buying them?