Sunk cost fallacy
An example in the real-world would be pro-war Americans during the Vietnam War. Americans who supported United States' part in the Vietnam War believed that the US already spent so much money, so much time, and so many lives of veterans and civilians that if the United States were to let the communists win the war, then all the loss would have been for nothing.