Perhaps it is because what soldiers do parallels what Jesus did in several ways.
1) Soldiers leave behind the comforts of home. So did Jesus:
“Have this attitude in yourselves which was also in Christ Jesus, who, although He
existed in the form of God, did not regard equality with God a thing to be grasped, but emptied Himself, taking the form of a bond-servant, and being made in the likeness of men.” letter to the Philippians 2:5-7
2) Soldiers serve. We call each branch of the military; “the service,” and we refer to anyone in the military as a service man or woman. Jesus came specifically to serve.
“But Jesus called them to Himself and said, ‘You know that the rulers of the Gentiles lord it over them, and their great men exercise authority over them. It is not this way among you, but whoever wishes to become great among you shall be your servant, and whoever wishes to be first among you shall be your slave; just as the Son of Man did not come to be served, but to serve, and to give His life a ransom for many.” Matthew’s gospel, 20:25-28
3) A soldier’s allegiance is to an ideal much greater than himself. Jesus was the
perfect example of such loyalty.
“Meanwhile, the disciples were urging Him, saying, ‘Rabbi, eat’. But He said to them, ‘I have food to eat that you do not know about.’ So the disciples were saying to one another, ‘No one brought Him anything to eat, did he?’ Jesus said to them, ‘My food is to do the will of Him who sent Me and to accomplish His work.’
John’s gospel, 4:31-34
4) Soldiers are willing to offer themselves up, giving what Abraham Lincoln called “the last full measure of devotion.” Soldiers can only offer themselves to temporal freedoms, but Jesus offered himself to secure our eternal freedom and peace
between us and God.
“For God so loved the world, that He gave His only begotten Son, that whoever believes in Him should not perish, but have eternal life. For God did not send the Son into the world to judge the world, but that the world might be saved through Him.” John’s gospel, 3:16-17