It's not a single tense (would have - past conditional, had to - past modal, have been - pluperfect), it's a hypothetical past state being caused by a hypothetical past event, but the trick here is that the "past state" is omitted because it's contextually read. If you were giving full context it'd read: "If it was spitting out sensitive information, it would have had to have been trained on it."
Take that, ESL learners!
You can't leave purgatory at will