Hmm, this is fairly interesting. If it was a failed attempt, it was a pretty crappy attempt. But they did end up making something really cool in the process. For
Both Ditto and Mew are the only Pokemon to learn Transform.Against
Both Ditto and Mew are the same colour, when shiny or otherwise.
Both Ditto and Mew have the same weight.
Ditto seems to be an amoeba, or something else unicellular. It could could also have something to do with undifferentiated cells, which would explain the whole "experimenting to create Mew" thing.
There are loads of Dittos, and only one Mew. Surely when the scientists messed up and created Ditto, they wouldn't repeat their mistake and continue to make Dittos.
From all this, my theory would be that Ditto wasn't a failed attempt, but it, and it's 'properties', were used in the actual process of creating Mew.
"You can't reason yourself back into cheerfulness any more than you can reason yourself into an extra six inches in height."
"You don't sit down and write a wish list about the person you are going to fall violently in love with. It just doesn't work like that."