It seems that the addition was made already in antiquity and motivated by the apparent gap in the proof of I.4. Rabouin in Proclus’ Conception of Geometric Space and Its Actuality writes:
"Another example of straight line represented as “non straight” and used by Proclus is given in the course of the commentary on I.4. There he criticizes the fact that Euclid assumed without proof that two lines cannot enclose a space (this is a crucial assumption in proofs by superposition such as I.4 or I.8 and was even incorporated in the “common notions” in some versions of the Elements). Proclus undertakes to provide the missing argument and proceeds ad absurdum..."
In an attached footnote, he adds:
"If we accept triangles with sides
represented as “unstraight”, we could make two triangles coincide on two of their sides and the
angle contained by them without coinciding on the third. This will ruin the demonstrations “by
superposition”. The admissibility of such a diagram seems to be attested in the discussion about
the curious “four sided” triangle, to which Proclus alludes in In Eucl. 329. Barozzi (1560, p. 189) With such a diagram, we could easily demonstrate the contradictory of I.4 by supposing that two triangles coincide on two sides (and the angle containing them) and then realize that one is
nonetheless contained in the other. This possibility is ruled out by the fact that it would presuppose admitting two straight lines enclosing a space."
There is a more detailed discussion of the history of "axiom 10" in Mueller, Philosophy of Mathematics and Deductive Structure in Euclid's Elements, who calls it "postulate 6". Mueller quotes Proclus's opinion that it should not be added to the axioms, meaning it was added in some editions of Elements already in antiquity, and it is controversial whether the words "two straight lines will enclose a space, which is impossible" in I.4 are also a later insertion.
"Proclus undoubtedly thinks the words are genuine, although he almost certainly knows of texts in which the postulate does not occur.
The existence of texts in which the words but not the postulate occur makes it seem likely that the postulate was added to justify the words... Proclus claims that Euclid knows or acknowledges [eidenai] the assertion when he states the first postulate, which presupposes the uniqueness of the straight line connecting two points. Proclus’ claim is vague enough to be incontestable. Euclid undoubtedly does “know” that only one straight line can be drawn through two points...
But... Postulate 1 implies nothing about uniqueness. And if Euclid wished to assert the uniqueness of the straight line, he surely could have done so — for example, by inserting a definite article before ‘straight line’ in postulate 1. The evidence suggests that Euclid never raised the question whether the impossibility of two straight lines enclosing a space was a logical consequence of his first principles. For him this assertion rests directly on the intuitive notion of a straight line, and, since this notion has been characterized in the definitions, there is no need to prove a directly obvious fact about it."
Wilkins lists variants of Euclid's first principles from various modern editions, and "axiom 10" appears in those "based on Commandinus". That would be Commandino's translation of the Elements from 1572. So Commandino, contra Proclus, sides with those ancient editors who thought that "axiom 10" could not be derived from others and had to be added as a separate one.