You're not anonymous to the lottery, just to the general public.
The lottery itself is not going to have the manpower to check if every winner was or was not childhood best friends with workers at the lottery. Being in the public would be more likely to bring that to light + would scare people off.