Benjamin Martin is the main character in the movie "The Patriot," which depicts the American Revolutionary War. Martin is a war veteran, who joins the ranks to fight for American independence. However, during the course of the war, both his sons die. When his son Gabriel is killed, Martin has doubts about continuing the fight, but he is reminded of the strength of his son and his determination in achieving independence. He decides he does not want his death to be a waste.
In this case, the phrase is meant to remind Martin of the reason why his son died. Gabriel died in order to fulfill a purpose: achieving independence. Men often think that if a death happens while trying to achieve a bigger purpose in society, or for something which is meant to improve the lives of a large group of people, then the death is justified. Benjamin Martin believes this too, which is why it motivates him to keep fighting.