A common phrase for this is that it's a necessary evil:
something unpleasant that must be accepted in order to achieve a particular result:
I think he regards work as a necessary evil.
Most Americans accept taxes as a necessary evil.
The word evil does not mean that the thing done is evil in the normal sense of the word.
From the Wikipedia definition of necessary evil:
The use of the term "evil" in the phrase does not necessarily indicate that the thing being characterized as a "necessary evil" is something that is generally considered an "evil" in the sense of being immoral or the enemy of the good. In Fuller's use of the phrase, for example, there is no implication that court jesters are evil people, or having one serves an evil end. The term is most typically used to identify something that is merely an inconvenience or annoyance. Where an author suggests that, "[P]aperwork is a necessary evil, despised but handled with the understanding that a mistake – even a trivial one – could be costly." It is understood that the author is not deeming "paperwork" to be wicked, immoral, or evil in senses comparable to those.Some thinkers specifically reject the idea of anything that is actually "evil" being necessary.
As said, the evil thing can simply be an inconvenience or annoyance—such as going through all of your contacts and resources in order to find the right venue for a wedding location.