Anti-siphon spring???

I bought a new filler neck recently and it came with a spring in it, then I had to take it back out when I had to siphon the tank.