Why do modern mathematicians include 0 and 1 as natural numbers when Euclid didn't?

Euclid didn't have the notions of a "set" or "natural numbers," so the question is a bit anachronistic. After all, "natural numbers" only makes sense in opposition to some other kind of number.

Book VII of Euclid's Elements is where he defines these notions and you can see that he makes a distinction between a "unit" (viz., 1) and "numbers." Nevertheless, "units" and "numbers" are both compatible with addition, subtraction, multiplication, etc.

For example, here is his definition of an odd number:

An odd number is that which is not divisible into two equal parts, or that which differs by a unit from an even number.

In other words, an odd number is of the form 2k - 1 for some number k.

So, even though Euclid's definition of "number" consists of the set {2,3,4,...}, he still throws 1 into the mix and has it interacting with all the other numbers. Just look at how many time Euclid mentions "unit" in Book VII.

As for including 0, well, the history of 0 is a storied one, but since the 16th century you're right that the natural numbers usually did not include 0.

This changed in the 19th century when mathematicians and logicians began systematically exploring the foundations of mathematics. It became clear that having 0 among the natural numbers was, well, the "more natural" thing to do. In the "set theoretic" definition of the natural numbers, 0 corresponds to the empty set {}, 1 corresponds to {{}}, 2 corresponds to {{}, {{}}}, and so on.

Including 0 also means that addition on the natural numbers has an identity element.

So, my answer would be that it wasn't until the early 20th century that we understood the notion of "number" well enough to have a sound justification one way or another.

/r/math Thread