When you scan a code, you get 10 points and once you reach 100 points, you can use the 'Island Scan' that will scan for a rare Pokémon not naively found in Alola and give you the opportunity to find and catch it.