It’s not a nutritional deficiency, it’s what they do. They’ll get some grit from it plus some minerals. One of the first things a broody hen teaches her chicks to eat is dirt.
It also helps them develop flock immunities if there are adults in the flock, especially immunity to coccidiosis. The problem with cocci is not that they have that bug in their system, having the bug is necessary so they can develop the immunity they need. The problem comes when the number of those bugs get out of hand. That bug thrives in wet warm ground and dirty water. As long as you keep the water clean and the brooder fairly dry they are unlikely to have an outbreak of cocci just from being exposed to it. It’s still possible so you need to watch for the symptoms, but it is pretty unlikely.
Eating dirt from where the adults have been also gives them any probiotics the adults have. Since you probably don’t have adults they don’t get this benefit. But I feed my brooder raised chicks dirt from the run on their second day in the brooder to get them grit, get them started on flock immunities, and give them probiotics from the adults. My broody hens take care of all this on their own with no help from me, except clean water of course.
A fairly typical scenario on this forum is that the chicks are raised in a brooder in a sterile environment, maybe even fed medicated feed, and are never in contact with the cocci bug. When they hit the ground and are exposed to the cocci bug for the first time they become sick since they have not developed immunity, especially if the run is muddy.
As far as I’m concerned giving them dirt is a very good thing, not something to freak out about. Their immune system will be stronger because of it.