The closest destination was Halifax, Nova Scotia, but it required traveling through more ice, and there wasn't enough food on board to meet the needs of the Titanic passengers in addition to Carpathia's if the ship sailed on to its original destination.
The ship's captain decided to head back to New York, which had been the Titanic's original destination.
Halifax later became the main port for ships retrieving bodies from the wreckage. According to the Maritime Museum of the Atlantic, three ships dispatched from Halifax were able to retrieve 328 bodies from the wreckage, or only one in five victims.
Roughly half of the Titanic victims' bodies are buried in Halifax, 119 bodies were buried at sea, and only 59 bodies were claimed by victims' relatives and returned home. A majority of the bodies buried at sea were damaged beyond recognition or belonged to crew members or third-class passengers.
The main vessel charged with retrieving bodies, the Mackay-Bennett, also ran out of embalming supplies — the ship didn't expect to find so many bodies in the water — forcing crew members to bury more people at sea than intended.