That... That right there made me hate the entire trilogy.. So we're slowly overwhelmed, we're slowly losing and being killed and the situation is so dire and... Oh there is the immortal deux ex machina guys just trampling over the enemy killing them all in a minute aaaaand we're done!
To be fair the entire army itself was just a distraction so that frodo could destroy the ring. The ghosts weren't what caused them to win, they just prevented the death of the bait.
Probably the biggest blunder in the movie trilogy. In the books, the ghosts are just used strategically to prevent enemy reenforcements from coming in from a port. No deus ex machina win until the ring is destroyed.
This is also one of several acts Aragorn performs that symbolize his authority and rightful place as king.
Why though? I don't think that Rohans problem was lack of proper swords. Giving it to a boy maybe 12-14 years old, because there is not enough men of fighting age was the problem at the time. But i don't think the Orcs would have made concessions bc. of that.
The Rohirrim were spread out dealing with raiding parties until after Helm's Deep. Contextually we're to understand that about half their available manpower is either dealing with other problems or just didn't answer the muster.