On the northern tip of New Zealand's South Island, there is a long bar of sand called Farewell Spit. The area is famous, but for an undesirable reason. It's a hotspot of whale strandings.

In February 2015, 200 pilot whales became stuck on the shore. It was the biggest stranding in the area in over a decade, according to local conservation teams. Rescuers spent hours trying to re-float them but 100 died. Without the support of water, the weight of their bodies crushed their muscles.

The remaining whales were watered and kept as comfortable as possible by volunteers equipped with buckets and spades. Sixty were eventually re-floated, but promptly stranded themselves again. Members of the public helped to re-float them a second time, and the whales are now believed to be back at sea.

Beaches like Farewell Spit are perhaps the most conspicuous places that whales can die. To all intents and purposes, it seems as though the whales have committed suicide by swimming too close to the shore. So are beaches like this the places where whales go to die – or are there other graveyards that we don't know about?

It's a mystery that has been around since antiquity. Over 2000 years ago, the Greek philosopher Aristotle questioned why whales and dolphins often washed up on shore. In Historia Animalium, he wrote: "It is not known for what reason they run themselves aground on dry land; at all events, it is said that they do so at times, and for no obvious reason."

Some coastlines get more strandings than others

Mass strandings happen frequently around the world. Individual whales do beach themselves too, so a mass stranding is defined as one in which two or more unrelated whales are beached.

In the UK, up to 800 cetaceans – the group that includes dolphins, porpoises and whales – are  stranded each year. In Scotland in 2013, there were 211 incidents. The south-east and north-west United States also see hundreds of strandings per year, as do the coasts of New Zealand and Australia.

It is not entirely random. While strandings can happen pretty much anywhere, some coastlines, like Farewell Spit, get more strandings than others. What is it about these places?

The weather seems to be a factor. In 2005, a team led by Karen Evans, then at the University of Tasmania in Hobart, analysed records of strandings over 82 years in south-east Australia and Tasmania. They found that strandings peaked every 11-13 years, and these peaks correlated with changes in wind patterns.

An animal could get lost and end up in an area they don't know

The altered winds may have driven nutrient-rich waters towards the coasts, luring the whales in too close. They could also cause storms, which might disorientate the whales and make them more likely to swim into the wrong area. Once they were stuck in shallow water, the whales would tire quickly.

That could explain why the pilot whales ended up stranded at Farewell Spit. "If you look at the geomorphology of that area, it's highly productive and there are a lot of animals," says Ari Friedlaender of Oregon State University in Newport. So the whales might have been lured by the promise of food.

Once in, they may have struggled to find the way out of the treacherous waters. "The tidal cycle can move a lot of water quickly," says Friedlaender. "It's not out of the question to think that an animal could get lost and end up in an area they don't know."

The strange thing about strandings is that they often happen to many whales at once. Sometimes, dozens of whales wind up trapped on the same beach at the same time. That suggests the whales' social nature might also be playing a role.

Many whale species live in large groups, including many females and their calves. That includes pilot whales, the species most prone to mass strandings. This has prompted the "sick leader hypothesis". If a dominant member of the group falls ill or gets lost, the others might follow even if it leads them to danger.

It might be that the whale knew it was ill and fled to the shore

There is tentative evidence for this from 2012, when a group of long-finned pilot whales stranded themselves on a beach in Scotland. One of them was an old, diseased male, who may have been the "sick leader". This male may have purposely veered into shallower water because he wasn't fit enough to stay in the depths, says Andrew Brownlow of Scotland's Rural College in Inverness, who led the investigation into the strandings.

"One of the theories is that animals will strand themselves when they are very weak because they don't want to drown," says Brownlow. He suggests there might be "something very deep in the terrestrial mammalian core that fires up when they are in extremis." Alternatively, it might be that the whale knew it was ill and fled to the shore to protect its relatives from the sickness – only for them to follow.

For now these are only suggestions. According to the final report into the stranding, "the information available does not permit definitive conclusions to be drawn". There are too many possible causes, says Brownlow.

There is another possible cause for strandings: humans. Many researchers and environmentalists have suggested that human activities contribute to strandings.

Whales are very easy to spook

They do seem to be happening more often. For example, in the UK there was a 25% increase between 1990 and 2010, according to the UK Cetacean Strandings Investigation Programme.  That might be partly because there are more people living on coastlines who might see the strandings, but it does look suspicious.

The most commonly cited culprit is military sonar, which can be so powerful that it penetrates into the deep ocean. "Whales are very easy to spook," says Brownlow. "They feed at this massive depth and they have no competition, so anything that disturbs them is really going to concern them."

Sonar could cause whales to come up to the surface more quickly than they usually would, disorienting them. Surfacing too quickly could also give them the bends, in which bubbles of gas form in their blood due to the rapid changes in pressure.

In military training areas in the Mediterranean and Caribbean seas, beaked whales seem to be more likely to strand when the US Navy carries out military exercises involving sonar. The Navy has now stopped running training exercises in beaked whales habitats.

Sonar has also been blamed for the mass stranding and death of about 100 melon-headed whales in a lagoon in north-west Madagascar in 2008. It was the first such stranding seen in the area. A report into the incident by the Agriculture Defense Coalition claimed that a multi-beam echo sounder (MBES), which measures the depth of the ocean floor, disrupted the whales' behaviour and caused them to strand.

But we cannot be sure of that, says Darlene Ketten of the Woods Hole Oceanographic Institution in Massachusetts, who was on the response team but did not contribute to the report.

Ketten points out that the whales had begun their journey into the area a day or two before the MBES was used. What's more, melon-headed whales have been reported to come near shore to feed during changing lunar cycles, so they might have been responding to the phase of the moon. "Whether the MBES contributed I couldn't say," says Ketten. "My own professional opinion is that it didn't initiate it."

Regardless of whether we are affecting strandings, it is clear that they would happen without us. Over the last few years, Nicholas Pyenson of the Smithsonian Institution in Washington, DC has uncovered evidence that whales have been stranding themselves for at least 5 to 9 million years.

Pyenson and his colleagues have been studying a "graveyard" of fossilised marine animals, found in the Atacama Desert in northern Chile.

In 2014 they reported that the fossils represented four separate mass strandings of baleen whales, which happened at intervals over 5 million years ago.

"What we see in the present, we can assume it's being going on for geological time," says Pyenson.

Like Farewell Spit, something about this area prompted repeated strandings. But in this case, the whales were probably already dead when they washed up on the shore. So Pyenson's team suspect that they were poisoned by enormous quantities of algae.

The team didn't find the remains of any algae at the site, admits Pyenson. But they did find plenty of iron oxides. In the ocean, these chemicals tend to fuel algal blooms, so finding them suggests blooms might have been present.

If there were blooms in the sea, the whales may have eaten poisonous algae, or eaten prey that had eaten the algae. Such algal blooms are extremely toxic. Once the whales were dead, the tide gradually washed them to shore.

Strandings of baleen whales were probably more frequent a few hundred years ago

Today, harmful algal blooms are a major cause of mass whale strandings. For example, 14 humpback whales died and then stranded due to these toxins in Cape Cod, Massachusetts over a five-week period in 1987.

Pyenson says strandings of baleen whales were probably more frequent a few hundred years ago, and even more common in the more distant past. That's simply because marine life was much more abundant in the past than it is today.

In 2003, geneticists estimated how large whale populations were before the modern whaling industry depleted them. They found that there were around 240,000 humpback whales in the Atlantic alone, compared to around 11,600 today. A 2007 study suggests that the gray whale population may have once been three to five times larger than it is now. Those ancient strandings must have been monumental.

The more we learn about strandings, the more it's clear that they are far from the most common way for whales to die. They are simply the thing that land animals like us are most likely to see. Given that whales spend much of their time far out to sea, that's where we ought to look for their graveyards.

Scientists had speculated for almost 200 years about what might happen to a whale that died in deep waters. Then in 1977, a US Navy vessel discovered the first such carcass by accident.

Ten years later, a group of marine biologists came across another one, again by chance. It was over 1km down in the Santa Catalina Basin off the coast of California. Since then, scientists have used submersibles and remotely operated vehicles to study these "whale falls". They found that the dead whales are home to bizarre communities of animals.

Whale carcasses fall to the bottom of the deep sea, where they are first scavenged by large predators like sleeper sharks and hagfish. Then a host of other animals move in. A single whale carcass can support a whole community of small invertebrates, such as crabs and worms that feed on the oil-rich bones and tissues. "They become nutrient-rich islands on an otherwise barren ocean floor desert," says Pyenson.

Researchers have now monitored whale carcasses for years to see how they change. Lonny Lundsten of the Monterey Bay Aquarium Research Institute in Moss Landing, California and his colleagues sank five carcasses and tracked them. They found that the species living on them became more diverse over the years, eventually including bone-eating worms, deep-sea crabs and multi-coloured pom-pom anemones (pictured below).

The carcasses are mostly gone after about 10 years. But in some circumstances they could stay on the ocean floor for 50 or even 100 years. That could happen in deep basins with little oxygen, where the scavengers' metabolisms would be slower. The size of the whale, says Lundsten, also determines its longevity. Larger whales have bigger, denser bones which take longer to degrade and provide nutrients for much longer time periods. 

There may be an awful lot of these whale falls out there. "Given the number of whales alive and how long they live, there would have to be hundreds or thousands that die each year," says Friedlaender. "But how many turn into whale falls I just don't know."

There may be hundreds of thousands of such carcasses on the sea floor

So far, every whale fall discovered has been a one-off death of a lone whale. No one has ever found an entire pod's worth of whale falls. But it may only be a matter of time until we do find such a mass deep-sea graveyard.

When whales migrate they tend to follow the same routes quite strictly from year to year, says Friedlaender. So it would not be surprising to find many whale falls dotted along these pathways, or even swept into the same narrow patch of sea bed by deep-sea currents.

We might also expect to find mass graveyards in areas where commercial whalers were particularly active, such as South Georgia in the Southern Ocean. In those deep, chilly waters, there may be hundreds of thousands of such carcasses on the sea floor close to each other.

Coastlines like Farewell Spit can sometimes become graveyards for large groups of whales. But the truly large-scale cemeteries are probably deep in the ocean, waiting to be found.

Follow Melissa Hogenboom and BBC Earth on twitter