To play the soprano and alto parts in this passage legato with the right hand alone would require one or more finger substitutions. These would possibly interrupt the flow of the passage.
This fingering solution requires each hand to execute a finger crossing in the first two notes. Then, for the remainder of the passage, it allows both hands the use of direct fingering by redistributing the alto part for four notes.