it removes hydrocarbons from petrol fumes before they reach the air outside as the tank vents. trouble is with age they deteriorate and clog so it can take ages to fill up because the air can't get out of the petrol tank as the new petrol tries to get in, so the petrol pump cuts out all the time.
another modern pita, gone are the good old days when the tank just vented straight to the outside.