I think that this joke appeared after the US invasion of Iraq, when the French government refused to take part. France was considered to have the strongest army in the world until 1940, especially since the French won WW1. And their quick defeat was a surprise for everyone. There are few examples of cowardice in the French military history. There have been many betrayals, but that happened to other countries too, including the US. Also I believe that this idea of French being cowards is mostly US, and if it has spread to other brains, it's only through the English language.