I suppose that the egg is fragile, but why would she tap it against the wall?
Native speaker’s answer
Rebecca
She taps the egg against the wall here to test it and check if it is really a golden egg. Since it is really a golden egg, it does not break, because it is not fragile but is made of solid gold.