Preliminary note: With "Euclid" I don't mean a person but the mathematicians of the Euclidean period of which Euclid (if he had been one person) was a representative.
I imagine that Euclid could have thought about relating lengths and numbers in a bijective way even though they were considered completely different things. For rational lengths, it would have worked because for each rational length there is a number (which for Euclid was necessarily rational) and vice versa.
But unfortunately there do exist constructible lengths which provably are not rational (e.g. the length of the diagonal of the unit square) and for which Euclid hadn't got a (rational) number to assign to. So this may have been the main reason that he abondonded the plan (if he had it) to relate lengths and numbers in a bijective way: there were not enough numbers.
But there may have been another (admittedly speculative) reason: For the assignment to work, one has to pick an arbitrary line segment and assign the number 1 (the unit) to its length. Did possibly Euclid dislike the arbitrariness of assigning the "primordial" unit (from the realm of platonic entities, from which all numbers are built) to a "random" line segment (from the realm of "earthly" entities)?
But note, that he doesn't define (in Definition VII.1) the unit, but a unit. So this might not have been the reason. But the question arises why he didn't define the unit, which seems much more intuitive. (How would he have distinguished between different units?)
Alternatively, he could have started with two "primordial" points – named 0 and 1 – from which all other points and lengths can be built with straightedge and compass, and assign the number 1 to the length of the distinguished "primordial" line segment $\overline{01}$ – but that's even more speculative.
I admit that I might completely misunderstand Euclid's way of thinking. Any hint in which respect I do so would be welcome.
To my defense: Euclid's Definition VII.1 is really rather obscure:
A unit is that by virtue of which each of the things that exist is called one.
source