It's probably worth flagging up the big difference in actual usage first...
Many people might say we avoid the more complex Present Perfect version simply because it's unnecessarily complex, and leave it at that. But I think the difference in prevalence is so great that most native speakers would notice if a competent speaker used the less common form.
Hence the less common Perfect form is "marked", which naturally makes us to look for some alternative to the "standard" meaning. And to my mind, the obvious distinction to make is...
1: How could you do that?
= "rhetorical question" - speaker is expressing shock / disapproval that you did it
2: How could you have done that?
= "genuine question" - speaker wants to know how it was possible for you to do it
(Of course, no such inference should be made if the speaker isn't a native Anglophone.)