Does anyone know why AirTags are magnetic?

Bonus: They’ve started paying for themselves.