There is no 'necessary connection' between what is legal and what is moral. [=what is legal does not always have to be moral and what is moral does not always have to be legal]
Higher prices are a 'necessary consequence' of the company's new services.
I'll 'do the necessary' [=do whatever is necessary] to get the job done.
(..) Okay. Let's do it. I wish to enter my vault. Identification? I hardly think that would be necessary. Madam Lestrange. I don't like to be kept waiting. Harry... What do we do, Harry? Madam Lestrange, (..)2011 Harry Potter and the Deathly Hallows: Part 2