Ah, but you see, "John" and "Doe" are two names - first and last - and when you say "My name is", you're really listing out your names, with spaces inbetween!
But then there's hyphenated names, and I have no idea how those are treated.
No, they didn't even use the space to separate words. Take a look at any Roman inscription in Italy, there are no spaces between the words (just like there are no silent pauses between spoken words).