What is the meaning of [What is sauce for the goose is sauce for the gander]

Whether we eat goose or gander, we have the same apple sauce with it, so what
is good for one is good for the other. If Barry plays a practical joke on
George, then complains when George does the same thing to him, George can say:
‘What’s sauce for the goose is sauce for the gander. Fair’s is fair. ‘