It is a grammatical error in prepositional phrase usage.
The phrase "on accident" likely arose by analogy with "on purpose," as both phrases are used to describe the manner in which something happened.
The correct phrase is "by accident," as "by" is the appropriate preposition to use with "accident" according to standard English usage.
People mistakenly combine "any way" into "anyway" even when they ... Learn more →
People often make this error because in English, many verbs ... Learn more →
People often confuse "then" and "than" because they are homophones, ... Learn more →
People often inadvertently omit the infinitive marker "to" when combining ... Learn more →