Why is it important that the digits be all different?
As per your linked wikipedia article, a later game based on the same concept is Mastermind. And from that game's Wikipedia article:


  Duplicates and blanks are allowed depending on player choice, so the player could even choose four code pegs of the same color or four blanks.


So no, it's not crucial. It makes the game harder in that there are more possible solutions.