suggests that
something desirable may come with risks, difficulties or unpleasant consequences that must also be accepted.
Imagine a case where you can't have good things without paying the price; You have to accept the bad or the danger along with what you want.; then “Honey is sweet, but the bee stings” fits well.