It probably rarely affects actual usage, but I suggest this as a credible distinguishing case...
The Queen's invited me to one of her garden parties, but don't want to go because I'll have to eat those stupid cucumber sandwiches, which I know will give me indigestion.
I think the vast majority of native speakers would prefer have over need above. My guess is it's because need connotates more strongly with necessity, while have to (usually pronounced haff/hat in present/past tense) connotates more strongly with obligation (often, to external authority, as opposed to meeting "internal" needs/requirements).
I can't think of a corresponding context where need is preferred over have to, and I admit I've no authoritative source for my speculation as to why (or even whether) my cited case applies.
EDIT: There's also a difference when the perfect construction is used to reflect the fact that something was actually done, despite being unnecessary/not required, as opposed to not done, because it was unnecessary. Given OP's full context, obviously the former applies, but...
1a: * He stayed in bed because he needn't have got up so early. (syntactic nonsense)
2a: He stayed in bed because he didn't have to get up so early.
3a: He stayed in bed because he didn't need to get up so early. ("equivalent" to 2a)
Arguably the principle of horror aequi (we don't like to hear or read identical constructions too close together) militates in favour of You didn't need to have done that (but explicitly, you did) rather than the have to version. But I'm not convinced it really matters there, because of the hafta pronunciation difference.