You should have passed the exam.
Can be understood as:
You are very smart; the exam is very easy for you; but you didn't pass the exam.
You are very lazy; the exam wasn't that hard for you, but you failed.
How to correctly use
should in many contexts like this?
Answer to "Can you elaborate how you arrive at the second interpretation?"
google "define:should", the first result tells us:
used to emphasize to a listener how striking an event is or was. "you should have seen Marge's face"
emphasizing how surprising an event was. "I was in this shop when who should I see across the street but Tobias"