Why "shouldn't of" shouldn't be
What kind of error is it?

Grammatical error due to homophonic confusion
Why do people make this mistake?
People often make this error because "shouldn't of" sounds like the correct "shouldn't have" when spoken quickly, leading to a misunderstanding of the contraction "shouldn't".
What is correct?
"Shouldn't have" is the correct form, where "shouldn't" is a contraction of "should not" followed by "have", which is needed to form the perfect tense.
Examples of correct usage
- You shouldn't have left the door open.
- They shouldn't have eaten all the cake.
- She shouldn't have told him the secret.