If I understand your question correctly, you are asking about why 'should have' is in a different position in the two sentences and what difference that makes to the meaning. The second sentence can be used in two different circumstances, the first is that the results of the exam are not yet known, but you expect that when the results are known, he will have passed, the second is that the results are known and he has failed and you think that he should have passed. The first sentence would be used if the results are known, he has passed, but you did not expect him to pass. To summarize, sentence one he has passed and you did not expect him to, sentence two your expectation was that he would pass the exam but either he failed, or the result is not yet known.
Having said that, the first sentence, while understandable, is a bit awkward, and it would be better to use either the simple past or the perfect tense - 'it is surprising that he passed the exam' or 'it is surprising he passed the exam'.