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.
(..) I saw them executing Lannister prisoners in the street. They said they were acting on your orders. - It was necessary. - Necessary? Have you been down there? Have you seen? Children, little children, burned! (..)2019 TvShow: Game of Thrones Title: The Iron Throne Season: 8 Episode 6