I agree that being the first is important.
I have had a paper reviewed, then rejected, only to see the same idea elsewhere a while after. I cannot say the reviewer "had the same idea" nor prove, but it is known to happen. Putting into arXiv remediates that.
However, my personal issue with that is that the journal might not be that keen to want to publish your paper after knowing it was publicly available elsewhere, as they thrive "innovation" and "being the first" as well.
It's a very difficult problem, indeed.