I don't remember that there was any problem with the compasses. The disaster was completely Lt. Charles Taylor's fault. He appears to have become totally discombobulated and reached the conviction that he was south of Florida in the Florida Keys even though his flight plan had taken him east of Ft. Lauderdale. He thought this even though the radio transcripts show his students telling him that he was wrong, and that if they just flew west they'd reach the Florida mainland.
I don't think anything can really account for it except for a complete brain spasm on Taylor's part. Before being assigned to Ft. Lauderdale he'd routinely flown out of Miami on a Florida Keys flight plan, so my guess is he got disoriented and thought he was still doing those old flights. What triggered it? Who knows.
The same thing that's caused innumerable flight deaths... failure to trust ones instruments.