What is the meaning of [a good Jack makes a good Jill]

People who live or work together should set a good example to each other—a good husband will have a good wife, a good master will have a good servant, and so on.