it means that In order to enjoy one thing, you might have to endure the annoying or unpleasant things that accompany it.