It to keep the crud out of the axle tube and help the axle seal last longer. That piece of plastic just sits in one spot. It's free to spin, and to move a little laterally.
Yup - there will be a bit of end play in the axle so it can't fit tight against the tube.
In some applications it might be called a "slinger" as it slings stuff away from the seal and what it's protecting.