Well a long held misconception and a wrong belief was that they did this by changing their names to be more American. But now it is mostly confirmed that that actually didn't happen or it happened in really small number of cases. The names that were given to the inspectors at Ellis Island were supplied by the shipping companies that transported the immigrants to the US. So if there was a mistake in name spelling the mistake most likely happened in the country the immigrants came from.