Credibility. Reading a mathematical paper takes a huge amount of effort, and people won't go through that unless there is a high chance to believe the paper is good/correct. Usually this is determined by 1) The author is famous 2) The journal is respected.
This is the same basic problem self-published novels face. There are probably some very good self-published novels, but without someone whose opinion I should trust verifying that they're good, I'm unlikely to a) find out about them and b) if I do find out, read them and decide for myself.
A lot of novels that I turn out to like enormously don't have first chapters that immediately speak to their greatness. But most of the novels I read, I read because an interesting review caught my attention, I've read the writer before, or the book has been recommended by someone who I trust. The first two in my preceding list roughly map to author fame and journal respect.
The ArXiv includes a link to the actual (usually gated) journal article. And the text of that link is the journal name and citation.
My question isn't "why do people submit to journals?" it's "why post the actual PDF from the journal on your webpage (thereby taking a slight risk of getting in trouble) rather than just linking to the ArXiv version?".
To answer your actual question, I personally do it because I almost wish the journals would do something nasty to me. Then, I would tell everyone I meet at every conference about that for the next few years and would hasten the decline of the current status-quo.