The point of the inclusion was for the officials to realize the potential repercussions if the villain isn’t caught; the intention definitely wasn’t to sensationalize a tragedy for the sake of entertainment.
The episode incorporated the Nairobi shooting footage during a scene in which officials were reviewing footage of terror attacks perpetrated by the series’ villain in years past.
It was a big error in judgment on the part of the 24: Legacy producers, but at least they chose to take the heat for what they did.
The clips chosen for the episode showed masked gunmen opening fire on civilians in a shopping mall as well as the crowds that were attempting to flee the shooting.