Not everyone would agree that the American flag is a symbol of freedom. Many Native Americans and Native Hawaiians would say that it is the flag of the people who took their lands. The descendants of slaves could say that it was the flag of the people who enslaved their ancestors and practiced discrimination against them for a century afterwards. The US flag is by no means universally seen as a symbol of freedom.
However, there are many ways in which the US flag is a symbol of freedom. This is because the US is a country that was based on freedom (at least for some), which had (at least often) fought to help others have freedom, and which gives its people a tremendous amount of freedom.
The United States was based on the idea that monarchy is bad and that democracy is good. The American colonies fought a war to throw off the rule of the King of England. Soon after, they created a democratic republic with a constitution that protected people’s (at least white people’s) liberty and freedom.
Since then, there have been times when the US has fought or otherwise worked to help others be free. This happened most clearly in WWI and WWII. In WWI, the US helped fight to free countries like Belgium and France that had had all or part of their land taken by Germany. In WWII, the US fought to liberate Western Europe from the Nazis and to push the Japanese out of the empire they had taken. The US continues to use its power to try to bring freedom to other countries and many people wish to come to America, in part because of the amount of freedom that Americans have. People around the world know that Americans have many rights that are protected from government interference.
For all these reasons, it is at least possible to see the US flag as a symbol of freedom.