The ??? type does not exist in the coding of Generation I. It exists only in Generations II, III, and IV solely to be the type of Eggs and the status move Curse. Unlike other types, the ??? type is not programmed to have weaknesses or resistances.
The move Curse was given the ??? type when introduced in Generation II, likely because of its mysterious nature: it is so far the only move which differs in its use between Pokémon of different types.
Guess it was just something Game Freak did for the move.