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.
(..) at least another week. You know, you are very good at what you do. Thank you. I was prepared to surrender my body to Clouseau if it was necessary. Why did you do it? I didn't. I said I was prepared to. Aren't you a little bit proud of me? (..)1975 The Return of the Pink Panther
(..) When we find the fingerprints- If you find the fingerprints - You are both in trouble. But- But if we- Do what is necessary... and conventional. I am calling in outside help. The famous French detective who recovered the Pink Panther the last time it was stolen. What was his name? (..)1975 The Return of the Pink Panther