Would you have jumped in right away to swim with it, wait a while or call the dive?
While many things
can be 'dangerous,' I don't consider a 6 foot hammerhead a health hazard to a human adult, assuming no food or bait in the water and you don't grab it or something ridiculous like that. Scalloped hammerheads close to that size school in the Galapagos, and I was part of dives in the Wolf and Darwin's Arch areas where diving with them was part of the draw.
In non-baited situations with good viz. by day where shark encounters weren't planned, here's what I
think I'd do.
1.) Most sharks 6 feet long or less wouldn't deter me, except perhaps an oceanic white tip (particularly if more than one). Have not dove with those. They seem more willing to quickly approach and 'challenge' things they're not substantially larger than, from reports I've read. Watching one zip around and tear into a guy's calf on a video shot in the Red Sea stuck in my mind.
2.) If that hammerhead were close to 10-feet, I don't know. They're not commonly associated with shark attacks, so maybe, maybe not.
3.) I've dove with sand tiger (non-baited), lemon and tiger (shark feeding dives) sharks. Sand tigers don't bother me, lemons I'm pretty cool with, and yet unless I'm planning to dive with tiger sharks as part of a group, once it gets up around 8 to 10 feet, I doubt I'd knowingly dive in with one (though I might as part of a large group).
Years ago I went on 7 shark dives with Emerald Charters, and saw 2 female and 1 male tiger sharks. I was told the females were close to 10 feet; the male was noticeably smaller, but obviously capable of killing someone; I'm guessing he was around 8 feet long. So an 8 foot tiger shark is an intimidating presence.
4.) Never saw a great white; hope to some day (conditional no one is hurt and no close calls). But to knowingly get in the water unplanned with one well over 6 feet? That'd be hard to do.
5.) I've never dove with a mako, but from what I've read, their appearance and reputation, they join oceanic white tips as a species I'm quicker to get nervous about at smaller sizes.
6.) Bull sharks. I've dove with bulls, but not really big ones.
If the viz. is good and there's no baiting/feeding, I'd probably go in unless it was really big. If more than one and big, maybe not.
A big question is what are other divers on the boat diving. If it's a shore dive, or somehow a solo boat dive, then the guidelines I gave hold. And this is for U.S. and Caribbean region diving; if in more distant waters, I'd like to hear what dive staff think. I don't know how to reckon the dangerousness of bronze whalers, etc...