For one thing, your functions become easier to unit test, relatively speaking.
function getLongNames(names) {
let longNames = [];
for (const n of names) {
if (n.length > 20)
longNames.push(n)
}
return longNames;
}
function getLongNames(names) { return names.filter(n => n.length > 20); }
In this case the second implementation is clearly superior, as it avoids implementing array filtering de novo. But the same point applies to other examples where neither style promotes more code reuse than the other.