(CNN) A man in a rented pickup truck mows down people on a busy bicycle path near the World Trade Center. Eight people are killed, and the attack is almost immediately called an act of terror.

A man armed with a rifle storms into a Texas church during Sunday morning service and starts firing. More than two dozen people are killed, but investigators don't call it terrorism.

Why are some violent acts labeled terrorism and others not? And does it even matter?

What's terrorism?

It's understandable that the New York truck attack -- the deadliest terror attack in New York since 9/11 -- was called terrorism. The suspect, Sayfullo Habibullaevic Saipov, said he was inspired by ISIS, and other ISIS sympathizers have used vehicle-ramming attacks overseas to kill scores of people in recent years.

But armed terrorists around the world have also charged into public spaces, firing indiscriminately at innocent people, just like Devin Kelley did when he killed more than 26 people Sunday at the First Baptist Church in tiny Sutherland Springs, Texas. The massacre -- the worst in Texas' history and the fifth-worst in modern American history -- killed about 4% of the town's population.

At a news conference Monday, Christopher Combs, special agent in charge of the San Antonio division of the FBI, said "at this time we don't have a terrorism investigation open."

So why isn't the Texas church shooting being called an act of terror?

Part of the confusion stems from the fact that the world has never really settled on a standard definition of "terrorism." The US Code of Federal Regulations defines it as "the unlawful use of force and violence against persons or property to intimidate or coerce a government, the civilian population, or any segment thereof, in furtherance of political or social objectives."

But it is not a standalone criminal charge.

"There is not a domestic terrorism crime as such," FBI Director Christopher Wray said in a Senate hearing in September. "We in the FBI refer to domestic terrorism as a category but it's more of a way in which we allocate which agents, which squad is going to work on it."

So once again, it all comes down to motive. Was there a political or ideological agenda behind the attack?

In another example, from March of this year, a white man named James Harris Jackson stabbed to death a black man in New York and said he did so as a "practice" run for more killings of black people. Jackson was charged with murder in the second degree as a hate crime.

But Jackson also faces a terrorism charge in the case -- murder as an act of terrorism in the first and second degrees.

According to police, Jackson, a Baltimore resident, said he traveled to New York because it is the media capital of the world and he wanted to make a statement.

JUST WATCHED Police: Stabbing was racially motivated Replay More Videos ... MUST WATCH Police: Stabbing was racially motivated 00:59

That was enough to convince the Manhattan District Attorney that Jackson should be charged with terrorism.

"James Jackson prowled the streets of New York for three days in search of a black person to assassinate in order to launch a campaign of terrorism against our Manhattan community and the values we celebrate," he said.

What's not terrorism?

Some attacks, at first glance, seem like they should be labeled terrorism. But they're not.

Just a month ago Stephen Paddock smashed two windows on an upper floor at the Mandalay Bay Resort and Casino in Las Vegas and fired on thousands of people at a country music festival below. He killed 58 people in the worst mass shooting in modern American history. But neither President Trump nor investigators called that an act of terror.

Trump called Paddock a "sick man, demented man," but did not answer reporters' questions at the White House about whether he committed an act of domestic terror.

"We have to establish what his motivation was first," Clark County Sheriff Joseph Lombardo said at the time. The investigation, which is ongoing, has so far not discovered a motive for Paddock's violent rampage.

JUST WATCHED Chilling moments from Dylann Roof's trial Replay More Videos ... MUST WATCH Chilling moments from Dylann Roof's trial 01:20

Think back to Dylann Roof and the killing of nine people at historically black Emanuel African Methodist Episcopal Church in June 2015. Roof, a white supremacist, said he killed the nine attendees of a Bible study at the Charleston, South Carolina, church because he wanted to start a race war. He was convicted of hate crimes and sentenced to death, but never charged with terrorism.

That's despite an outcry from many who said what Roof did was, in their eyes, the textbook definition of terrorism. In an CNN Digital opinion piece, CNN National Security Analyst Peter Bergen wondered what the US would have called the attack if Roof had been a Muslim

"But do the thought experiment: If this attack on the church in Charleston had been conducted by a Muslim man shouting 'Allahu Akbar,' what is already a big news story would have become even bigger, as it would appear to fit so well into the political and media narrative that Muslim militants are the major terrorist problem in the United States," Bergen wrote.

His comments get at what some observers have been saying for years -- some acts of violence are only labeled terrorism if the attacker is dark-skinned and Muslim.

"There's a danger that we only use the word 'terrorism' to refer to a particular racial profile of perpetrator," said Andrew Mumford with the Center for Conflict, Security and Terrorism. "The Charleston example is a really important one ... Sometimes (the label) terrorism is not used when the nationality of the perpetrator does not fit conventional stereotypes."

Does it matter what you call it?

There are legal distinctions to calling an act of violence a hate crime or terrorism.

And because labeling something as terrorism has legal ramifications, it is not applied lightly.

Federal officials work with a very specific definition of when something is an act of domestic terrorism.

It has to have three characteristics: an act that takes place in the United States, that's dangerous to human life, and is intended to intimidate civilians or affect government policy by "mass destruction, assassination or kidnapping."

Consider the Fort Hood shooting in 2009 . To the victims at the Texas base, it was an act of terror, when Maj. Nidal Hassan opened fire on his fellow service members, killing 13 people.

JUST WATCHED Jury recommends death for Nidal Hassan Replay More Videos ... MUST WATCH Jury recommends death for Nidal Hassan 02:14

But again, even though the attack met some of the criteria, federal authorities never used the terrorism label. Avoiding the label made it easier for them to pursue the death penalty.

At the end of the day, does it really matter if something is or isn't labeled a hate crime or an act of terror? The pain and anguish felt by the survivors of such violence and the victims' families is just as unbearable ... no matter what you call it.