It's BY accident; "on accident" is incoherent gibberish, no matter how many young whippersnappers imagine that it's clever of them to "evolve" the language in this way. (And get off my lawn while you're at it ....)
It’s a common mistake by non native English speakers. There are many non native English speakers on the internet. Go easy, it’s not necessarily what you assumed