Sonata form is an evolution of the binary form. We find a perfect example in the first movement of Haydn's Divertimento Hob XVI : 8 (often titled Sonata).
In this movement, what would be section A of a binary form is the exposition. Its first phrase - in the main key - is the first part and the second phrase - in the dominant key - is the second section.
The development begins in section B. We arrive at the recapitulation after only ten measures. The second phrase is now in the main key.
The repetition of the development and the recapitulation will eventually be discarded later, yet we still find the repetition in Mozart's sonatas.