Here is a guess.
The Pledge was originally written in 1892 to honor the 400th anniversary of the discovery of America. It was intended to be used as an expression of loyalty for young people. Over the years it became popular in schools and was included in the US Flag Code in 1942.
Since it is a pledge for young people, and since military personnel have already taken an oath, it is not necessary for military personnel to recite the pledge. The code directs that military personnel in uniform stand silent while rendering a military salute.
http://www.va.gov/pubaff/celebAm/pledge.htm
Controversy continues over whether the author was the chairman of the committee, Francis Bellamy - who worked on a magazine for young people that published the pledge - or James Upham, who worked for the publishing firm that produced the magazine. The pledge was published anonymously in the magazine and was not copyrighted.
According to some accounts of Bellamy as author, he decided to write a pledge of allegiance, rather than a salute,because it was a stronger expression of loyalty - something particularly significant even 27 years after the Civil War ended. "One Nation indivisible" referred to the outcome of the Civil War, and "Liberty and Justice for all" expressed the ideals of the Declaration of Independence.
The words "my flag" were replaced by "the flag of the United States" in 1923 because some foreign-born people might have in mind the flag of the country of their birth, instead of the U.S. flag. A year later, "of America" was added after "United States." No form of the pledge received official recognition by Congress until June 22, 1942, when it was formally included in the U.S. Flag Code. The official name of The Pledge of Allegiance was adopted in 1945. The last change in language came on Flag Day 1954, when Congress passed a law which added the words "under God" after "one nation."
Originally, the pledge was said with the right hand in the so-called "Bellamy Salute," with the hand resting first outward from the chest, then the arm extending out from the body. Once Hitler came to power in Europe, some Americans were concerned that this position of the arm and hand resembled the salute rendered by the Nazi military. In 1942 Congress established the current practice of rendering the pledge with the right hand placed flat over the heart.
Section 7 of the Federal Flag Code states that when not in military uniform, men should remove any headdress with their right hand and hold it at the left shoulder, thereby resting the hand over the heart. People in military uniform should remain silent, face the flag and render the military salute.
The Flag Code specifies that any future changes to the pledge would have to be with the consent of the President.