I've seen the case that at least for the Greeks, heavy infantry weren't particularly vulnerable to arrows, because their armor tended to repel missiles shot from anything less powerful than a compound bow. But soldiers were inconsistently armored and arrows did do a good job harassing and breaking up formations for cavalry to do damage. They were vulnerable to light infantry--javelins in particular--which is why they needed their own light infantry (or cavalry) to allow for a true Phalanx-on-Phalanx battle. As for swords having an advantage over spears, the only justification I have is as the game's representation of the Phalanx (as was used in Civ II), getting out-maneuvered by the Legion (as was used in Civ II). So, it's not really swords, but the tactical flexibility of the Maniple system (which is arguably overstated in pop history). But, in the end, this is just rock paper scissors.
Side note: Bronze Working comes way too late and it bothers me. Pottery should also be a requirement for Iron Working because they weren't getting fire hot enough to produce steel without a kiln.
Iron and steel are not at all the same thing. There's a strong argument that bronze working should require pottery as well; alloying was done in kilns and the process of heating minerals into more useful products is a direct result of pottery.
You're right that iron working requires a kiln. More specifically, it requires a bloomery. The type of iron working that was done first doesn't involve melting the iron; you're able to reduce the oxide into metallic iron without melting it. The result was beaten and folded to remove impurities and resulted in a type of wrought iron with a low carbon content. Fluke occurrences sometimes resulted in mild steels being formed but deliberate steel production was a long way off. It was in the medieval period that machinery could be used to raise the temperature hot enough to produce high-carbon irons like pig iron which could be converted into steel in a controlled burning process.
The bronze age transitioned into the iron age in Europe starting during the bronze age collapse: bronze was a very easy metal to work with. It was superior to the softer, spongier copper that was used in making the earliest tools. The addition of small amounts of [then unknown] elements such as tin, zinc or arsenic resulted in a metal that was stronger, melted at a lower temperature, casted into molds more easily and could be work-hardened by hammering to form tough edges. The metal often had a golden tint to it and formed a green patina when oxidized (much like copper, which made up ~90% of bronze) which protected it from further corrosion. Copper was also readily available in its native form, making locating veins of metal and processing them relatively easy. Bronze had some disadvantages though: the trace elements that converted copper into bronze were very rare. Around the Mediterranean, sources were scarce. Most of the west sourced their tin from Afghanistan, and that made bronze expensive and required functional long-distance trade routes to stay open.
When many major civilizations collapsed c. 1200 BC, trade routes were cut off and the flow of tin around the sea stopped. Bronze became either ridiculously expensive or unavailable. Iron working was somewhat known at this time (early sources of meteoric iron had been worked previously) but the skill was not at all developed. The reasons for this are: iron ore was much harder to convert into iron metal, requiring a carefully controlled process in a special type of kiln called a bloomery. Pure carbon charcoal was necessary for this process. The resulting "bloom" was a slag-ridden mess of iron and waste products that unless correctly processed, would be worthless as much more than a paper-weight. But despite the relative difficulty of producing iron, civilizations began to produce iron tools. Practice and experimentation improved the process and more-pure versions of wrought iron could be produced. This iron was lighter than traditional bronze but also softer. It dulled more easily and couldn't hold an edge as well. It corroded into a terrible rust which sped up over time, destroying tools that weren't properly maintained. In many ways it was inferior to bronze. This was all off-set by the most important quality it possessed: it was incredibly cheap. Iron ore deposits are incredibly common no matter where you are. Iron could be produced by nearly anyone very cheaply. You merely needed an iron-rich ore and a source of wood to cook into charcoal in order to produce it. Iron quickly became the material of choice for nails, fittings, tools, arms and armor.
It was later discovered that by carefully controlling the carbon content in the iron, one could produce what we now call "steel". Carbon steel typically has a carbon content in the range of 0.4-2% by mass. The carbon atoms reinforced the iron crystal structure, making it more rigid and able to resist incoming shock. Too much carbon would result in a very hard, but very brittle product (this is what pig iron is), suitable as a file or chisel but not a weapon or tool. Carbon also enables quenching as a method to help control the types of crystals that form, further improving the mechanical properties of the steel.
Edit: one of the main reasons it is difficult to produce steel from a bloomery is the inclusions of waste and slag. The process of beating impurities out of the iron burns most of the carbon present. Attempts to retain some carbon would additionally retain impurities, making the steel very weak and flaky. Pig iron was a high-carbon (4+%) steel that was relatively free of impurities. This meant that the carbon could be burnt off in a way that you could control the carbon content of the resulting metal.
Edit2: As I mentioned above, some steels were possible to produce at this time. The process was not very well understood or controlled however. Many people like to use the word "steel" when talking about iron or iron alloys, but I try to avoid the word unless we're talking about alloys or metals from later periods in which the metallurgy had been developed more fully and the smiths understood the difference, how to achieve it, why it was better, etc. During the late classical and early medieval period, there was a lack of understanding of how or why certain processes improved the quality of the metals produced, and the non-rigorous approach resulted in an unreliable methodology.