Never attribute to malice that which can be adequately explained by stupidity.
Sometimes said as:
Never assume malice when stupidity will suffice.
— attributed to Robert J. Hanlon in a collection of jokes about Murphy’s Law.
This is known as Hanlon’s razor.