Normally the subject
of a clause
goes in the nominative
case: He arrived late
, not *Him arrived late
. This is also true when the clause is embedded in a larger sentence: I am surprised that he arrived late
However, this is only true when the clause has tense. When the verb is infinitive, its subject is accusative. It is marked as accusative by a verb or preposition from outside the clause: thus either It is surprising for him to arrive late, or I expect him to arrive late. This is called Exceptional Case Marking (ECM).
It is believed, in the standard Principles and Parameters theory of syntax, that all noun phrases require Case, even though many languages don't overtly mark it. But to get interpreted at Logical Form, they must have been grammatically checked for Case: this principle is called the Case Filter.
It is posited that a tensed verb has agreement features, but an infinitive lacks them: a tensed (or finite) verb can agree with its subject. In X-bar theory this is regarded as an example of Spec-head agreement, with the subject noun phrase being in the specifier position of the IP, the clause headed by the inflectional element I. So put a subject in this position with a non-finite verb, and its agreement features can't be checked, so it will fail the Case Filter. Therefore the subject of a non-finite clause must get Case assigned to it from elsewhere.
The Spec-head relationship is one way that Case can be assigned. Another is the Head-complement relationship. Verbs and prepositions can mark their complement with accusative Case: see him and for him. (It looks like accusative in English; in theory it could be some other more abstract Case that happens to look the same. This is not significant for discussion of ECM.)
This is why 'expect' can reach into the embedded clause and mark its subject as accusative in I expect him to arrive late, and why the complementizer 'for', which is also a preposition, can do it in It is surprising for him to arrive late. It is also why a plain infinitive clause can't appear on its own, or as the subject of a larger sentence: there's nothing in a suitable place to govern the subject. So you can't say plain *He/*him to arrive early, nor embedded *He/*him to arrive early is surprising, with either case. Nothing can assign Case in those constructions so they're ungrammatical. To make the latter grammatical you add the Case-assigning 'for': For him to arrive late is surprising.
The same considerations apply to small clauses (q.v. for details), such as I consider him intelligent, or I want him out of town. Here the embedded clause is said to be him intelligent, him out of town, etc.; and the difference is that this is completely lacking in the inflection node: there is not even an infinitive 'to' in it. But for essentially the same reason, the subject of the small clause can't be marked for Case by its inflectional head, but can be by the external verb 'consider' or 'want'.
Now the obvious alternative analysis of all these constructions is that the exceptionally case-marked element isn't a subject in a lower clause but an ordinary object in the upper clause: it's the same as in I expected him and I considered him, there's nothing exceptional about it, it naturally gets accusative, and you make up some story about how the rest of the clause is attached. This, in fact, is what is done in some alternative theories.
However, leaving aside theoretical reasons why we might want to consider that small clauses really are clauses and that all clauses have subjects, it also semantically doesn't fit to disregard the clausal nature of the thing. If you want John to succeed, you don't want John. If you see a bomb explode, you don't (necessarily) see a bomb. If you expect him to leave early, you (probably) don't expect him. The accusative-marked subject doesn't have the same semantic role as an object of the same verb. What you expect is his leaving: you expect that he will leave. The whole leaving by him is the thing expected. This is one good reason why the structure him to leave should be treated as a clause with its own subject, and the whole clause is the complement of the verb such as 'expect'. So the verb reaches down through the clause boundary and does exceptionally assign accusative Case to a subject.