I have never had a bird eating egg shells, but I had a bird who would eat cooked egg yolk.
On the other hand I think I have heard of crushed egg shells might be needed for newly hatched chicks for the purpose of getting more calcium.
If your bird was vomiting after eating the egg shells, you should stop feeding it.