It would depend on the trail. If it's mostly flat made up of dirt, it's not that bad. Where I usually walk, a bit higher up in the mountains, we have trails built of large stones, with occasional natural jagged and uneven rock faces. Then sandals are really bad.
Generally it's a matter of safety. Your feet can slip and twist far more easily in a sandal than even a regular shoe not to mention specialized hiking boots, plus sandals generally aren't designed to have grip on stone.
Next to a lot of other questionable things.