Yeah, you're certainly the favourite with a flush draw vs a straight draw, I guess he figured he could afford to risk it as he was chip leader and would still have half his chips left even if he didn't improve, plus he might have been considering other outs like pairing the ace, also he may have sussed that you were gunning for the flush and thought if you didn't catch it he could win with the ace high.
Losing out to a pair of 4's though that does kinda suck, unlucky...

(I hate it when those flush draws don't come off)