Let me ask you this: what does burying the head in the sand do for an animal in danger? It can't save it from its predator. And for a fast animal like the ostrich, burying their head in the sand is just not an option for them.
I think people said this only because ostriches have been seen with their head to the ground and we had no idea what they were doing.
In fact, they are either eating pebbles or sand from the ground to help them digest their food. T
hey also make use of their beaks to turn their eggs, thereby bringing them closer to the ground.
When they sense danger, they usually just run for their life.