The "here's your spear, go fight" part can't be stressed enough. In my experience, you can turn a gaggle of untrained nerds into a vaguely dangerous (if not always cohesive) unit in a day or so. It's prefered to have more time, but that can be enough. Plus it's a fraction of investment of a sword when you want to get into the hobby. Less labour-intensive if you are bent on making it yourself to boot.
Another thing is pairing. While I can confirm the result of 1 on 1 pairing between spear and sword with shield being unfavourable to the former, two lines of spearmen can simultaneously threaten those who closed in and who want to close the distance. Unfortunately, it's a tad advanced and not always possible to pull off if you aren't in a well-trained/mustered unit. Even then it isn't foolproof, but it's useful when you have to stand your ground at all cost. If I'm not making myself clear, I defer to Lindy's video on pike/helbard formations where he describes this and other situations a lot more eloquently than I can.