Unless I've been lied to, swords were both less effective than other weapons and were a lot more expensive. In general, other types of weapons make sense to me, because they're either take x object and put it on the end of a stick or figure out a way to fling an object at high speeds.
I'm assuming geography had something to do with it, as to my knowledge, Native Americans People from the Americas never made swords, but it seems like they were everything on the east side of the Atlantic (or is that the west side of the Pacific?) had a sword at one point or another.
What's the difference between a knife and a dagger? The dagger is double-edged. What's the difference between a dagger and a sword? The sword is bigger.
Obviously, when going to battle, a double-edged weapon is better than a single-edged one, and a larger weapon is better than a smaller one, so long as you know how to use it. Since knives have been common tools since Prehistory, it is not surprising that swords developed from them eventually, all over the world, as soon as smithing got to the point of allowing it (you cannot make a sword out of a stone block, after all). It is not surprising that swords would not appear in cultures that didn't use metal to make weapons as in Oceania and most of the Americas. However there are exceptions:
The Mesoamerican macuahuitl was a two-handed club that could be embedded with obsidian blades if the handler wanted to kill his enemy. That makes it kind of comparable, but not identical to a sword. It could just as well be considered a cutting club or a two-edged axe with multiple, small blades.
The Polynesian leiomano, in many aspects comparable to the macuahuitl but also smaller (often single-handed), wider, and embedded with shark teeth instead of obsidian blades. Again, does this qualify as a sword? Or is better described as a small, spiked club?
It is also worth of note that there was at least one sword in the Americas, used in the Andes where both copper and bronze smelting were known. This was called Tuccina by the Incas and in some ways it looks like a small, crude sword, not unlike one you'd find in an Old World early metal culture. We know, both from archaeology and Spanish accounts, that it was extremely rare in Incan armies compared to axes (both stone and bronze) and clubs (made of wood only or with stone tips, which sometimes could be very elaborated; there were even axe-club hybrids). We must concede that the Tuccina was probably inferior in many aspects to clubs and axes. However, the same cannot be said of the folded steel sabers used by the Spaniards. The Incas must have been of the same opinion, because when Manco Inca rebelled in 1535, he and his officers trained in, and used captured Spanish swords. So there you have it, a Native American army using iron swords.
I must disagree about swords being inferior to other weapons. Sure, it is expensive to make and requires a maintenance. Sure, you have to train in its use. Sure, both probably means you need a professional warrior class who does nothing but train with weapons all year long. If your army is made of peasants leveed for the campaign who are used to work with axes and clubs, you are better off equiping them with that (or letting them bring their own from home). But a sword, a good, longsword, can hit, cut, slash, stab, break shields and puncture armor, and cannot be stopped by an enemy grabbing it with his hand. Well, he can if he's wearing an iron gauntlet, but then he's probably from a culture with the most advanced metallurgy and best trained warrior class of all time. It is the ultimate non-pole melee weapon.
Another reason behind the development of slashing longswords, broadswords, sabers, etc in the Old World, as opposed to shorter stabbing swords like the Roman gladius, is that they were well suited both to fight from horseback, and to fight horse-riding enemies (mounted or from the ground). Of course, this wasn't an issue in the Americas because horses didn't exist there until the Europeans came along.
Overall effectiveness of weapons is a pretty iffy concept. Different tactics and situations call for very different weapons. Fighting off pirates at sea is a very different situation from flighting a formal set-piece battle on land. Besieging a castle is very different from fighting a cavalry skirmish. So rather than asking what is the best weapon you need to be looking at if there are any situations the culture in question encounters where swords are useful.
While the cost of swords has been quite high at times that's really only a problem if you have a completely egalitarian society. Otherwise it simply limits swords to those who control the largest amounts of resources (the rich and powerful).
Then you have the issue of reporting bias. Swords have a certain appeal which means that finds of swords are more likely to be reported. Even if they were far rarer than say spears for the culture in question we may well end up with a case where most of the swords are in museums where the spearheads are not. Thus you could consider the culture sword using even though they were pretty uncommon.
We also lump a lot of very different weapons under the category “sword”. A Gladius is a very different weapon from say a Mameluke sword which is in turn very different from an Estoc. So again you would see a range of cultures being reported as using swords but in practice using very different weapons.
One limitation on which cultures had swords is that they require that the culture in question has access to metal (unless you are going to classify the Macuahuitl as a sword).