Why does the welfare office ask who’s claiming you for taxes?

When you have Calfresh or medi-cal why do they ask you who’s claiming you for taxes?

Do they really check who’s claiming you for taxes? What’s the purpose of asking?