I love it that they included javelins in the game.
I have to admit that I did not make much use of them yet, but I intend to lateron when my shieldbearers gain enough levels to get some utility perks.
For two-handed weapon users like greatswords, pikes and the like I usually go with crossbows, but I can definitely imagine javelins for my other melee guys for the reasons you described above.
The only times when I do not switch to a ranged weapon and take a pot shot before engaging in melee, are when I need to pin the enemy in his position – and when I fight orcs. Don’t want them to get the charge on me, nu-uh.
But aside of that, short-ranged sidearms like javelins are superb to soften up the enemy before the deadly melee ensues.
Plague Rats - we're not famous, but we get the job done.