Walmart kinda does do a background check on you, yes. They have an entire biometric dossier, too.
They don’t care if you’re buying ammo illegally, though. But they are running background checks on everyone coming into their stores. Have been for a while.