I have come across the grammar structure had to have been in Crash Course US history. It is at around 1 minute and 51 second. Here it is in the sentence:
But for that slogan to make sense, there had to have been some way in which war was avoided.
What if the host had said ...there had to be some way..., would have this sentence meant the same? I struggle to see the difference, so help please me to see it, if there is any.