What do you mean "without being warned." Didn't the Germans take ads out in New York papers with a warning?
It was well known that U-boats had been sighted in the very area where the Lusitania was heading into - and Churchill apparently kept a specific warning from being transmitted to the ship. The presumption is that he knew mass civilian casualties would put the US over the edge.
The fact that the ship was also carrying a significant amount of munitions making it a legitimate target was also suppressed for many decades. Known by the Germans, and denied by everyone else to sell the narrative.
The US is populated with a warlike people, and it doesn’t take a whole lot to get them running to a fight.