This item about the meanings of the folds in a flag reminds me of a joke told by deadpan comedian Steven Wright: "Why is the alphabet in that order? Is it because of that song?" As often happens, a "meaning" has been grafted onto some facet of everyday life, to the point that a symbolic and after-the-fact meaning has been confused with an original purpose.
Traditional flag etiquette prescribes that before an American flag is stored or presented, its handlers should twice fold it in half lengthwise; then (from the end opposite the blue field) make a triangular fold, continuing to fold it in triangles until the other end is reached. This makes a triangular "pillow" of the flag with only the blue starred field showing on the outside, and it takes thirteen folds to produce: two lengthwise folds and eleven triangular ones.
The American flag isn't folded in this manner because each of the folds has a special symbolic meaning; the flag is folded this way because it provides a dignified ceremonial touch that distinguishes folding a flag from folding an ordinary object such as a bedsheet, and because it results a visually pleasing, easy-to-handle shape. This thirteen-fold procedure was a common practice long before the creation of a ceremonial assignation of "meaning" to each of the steps.
An elaborate flag folding ceremony incorporating these meanings has since been devised for special occasions such as Memorial Day and Veterans Day. These associations are "real" in the sense that they mean something to the people who participate in the ceremony, but they are not the reason why a flag is folded in the traditional thirteen-step manner. As was the case with the candy cane, an invented (religious) symbolism has become so widespread that it is now often mistakenly assumed to have been an integral part of the origins of the item it is associated with.
It is also a common misbelief that the above-quoted script originated with the U.S. Air Force (USAF) and is used by default at all veterans' funerals conducted under the aegis of the U.S. military. This is not the case, as the USAF has noted:
Though there are no official ceremonies in the Air Force that require a script to be read when a flag is folded, unofficial ceremonies such as retirements often do, said Lt. Col. Samuel Hudspath, Air Force protocol chief.
"We have had a tradition within the Air Force of individuals requesting that a flag be folded, with words, at their retirement ceremony," he said.
There is no shortage of scripts available that can be read aloud during a flag folding, but many of those scripts are religious in nature and also ascribe meaning to the individual folds put into the flag. One of the oldest of those scripts is attributed to an anonymous chaplain at the U.S. Air Force Academy.
Individuals who hear those scripts end up attributing the contents of the script to the U.S. Air Force. But the reality is that neither Congress, nor federal laws related to the flag, assign any special meaning to the individual folds.