When you throw an egg at a player, instead of hitting them, it passes through them. If you throw an egg into water and then go under it, it gets moved instead of breaking. They used to deal the same amount of damage as a snowball, and deal knockback. Eggs will still hit entities if thrown at.
Steps to reproduce:
Throw an egg into the air.
Fly up to the egg and let it fall on you. Notice that the egg goes through the player.
I'm not sure if this works with other players, just yourself.
Attachments
Comments 2

Can confirm, affects 1.20.51
This can also be reproduced in survival mode, the egg will phase through the player regardless of gamemode. I have not tested this in multiplayer.
As for eggs not breaking on contact with water and sinking, this is most likely working as intended.
Observed results:
A player can't hit themselves with an egg.
Expected results:
A player should be able to hit themselves with an egg.