It is my understanding that HIPAA was created because Bill Clinton has Herpes. He resented the White House Doctor asking him what he needed a specific prescription for. He fired the Doctor, and appointed one of his own. (This was during the Transition period when Bush's White House doctor was still there.)
Clinton was very sensitive about all the nasty diseases he carried, and so he pushed for legislation making the disclosure of medical information illegal. (Also AIDS patients represent a big chunk of the Democrat party.)
Thats is about the best explanation that I have heard. I was told that it was to prevent health insurance companies from finding out people had AIDs and denying them coverage for a pre-existing condition. Of course that doesn’t make much sense because the insurance companies still find out about everything. I think your explanation makes more sense.