It is a bad trait.  
Try a couple things.  First, make sure she isn't having a protein shortage and is resorting to doing this for survival reasons.  Feed her super quality, high protein feed ONLY for a week.  No low protein snacks or treats of any kind.
Try to gather the egg, if she is regular time layer, immediately after she lays it.  What a pain.  Worth a try.
Finally, an egg eating behavior is sometimes an adopted or learned behavior that is very, very hard to break.  Most hen keepers cull any bird who adopts it.  Whether the bad behavior is contagious to the rest of the flock is open to debate, but nonetheless, few take that chance.