By virtue of the fact that Germany was operating an unrestricted submarine campaign, the waters around the UK extending as far south as Cape Finisterre (north west Spain) and four hundred miles west of Ireland (later extended again in November 1917) were declared to be dangerous for all traffic. At first this included hospital ships, but Germany later agreed not to attack these vessels provided that they were not east of the line between Land's End and Ushant, while in the North Sea they could not come south of the line from Flamborough Head to Terschelling. In other words, they were safe in the Atlantic but if they entered the English Channel then they would be regarded as legitimate targets.
Carpathia was not a hospital ship so she had no such protection. She was a British flagged vessel within a declared war zone, and as such she was regarded to all intents and purposes as a legitimate target.