A straight versus flush draw means you are on a straight draw (8 outs) and the villain is assumed to be on a flush draw (9 outs). Your draw only has 6 outs because two of your 8 outs will complete villain's flush.

Ex:

you - JdTc
board - 3s 9h qh
villain - assumed to be on Ah 4h (nut flush draw that doesn't interfere with your str8)

You can hit : 8c 8d 8s 8h, Kc Kd Ks Kh - 8 outs
Villain needs : 2h 3h 5h 6h 7h 8h Th Jh Kh - 9 outs
But, your 8h or Kh completes his flush, so those are "bad" or "dirty" outs.