Other things being equal, a spear is an amazing weapon. It keeps all those loonies who believe that The Sword Is The Only True Weapon out of poking range, and does a good quarterstaff impersonation, as well. Is usable in a confined space. As a last resort, it can sacrifice itself as a shield. And, having a sharp bit on the end of a long stick, to poke things with - a useful thing to have.
Not got as good a range as a javelin, but you can
throw a spear. This can sometimes be a life-saver. And, 'Set Spear vs. Charge', rarely healthy for the charger. A spear is the preferred weapon for fighting most animals, too. If metal is short, a spear-head uses less resources than a sword. Cheaper to repair, too.
"Spear and Magic Helmet", might be noted, too.