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.
(..) How long until that core ignites? - That bomb goes off in hours. - Unless we can reconnect it to the reactor. - Can you get Miranda out of here? - Not tonight. I'm sorry. - Do what's necessary. - Tonight I need you. - What for? - To get me back in the game. Sorry to spoil things, boys, (..)2012 The Dark Knight Rises
(..) - What are you? - I'm Gotham's reckoning. Here to end the borrowed time you've all been living on. You're... pure evil. I'm necessary evil. No. No, no, no! When you started, why the mask? - To protect the people closest to me. - Yet you were a loner, right? - You didn't have any family? (..)2012 The Dark Knight Rises