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.
(..) your temper from time to time. - As all our great leaders do... - When have I lost my temper? Burning the Tarlys for instance. That was not impulsive. That was necessary. - Perhaps. - Perhaps. Perhaps the father needed to die and not the son. Perhaps they both needed time to contemplate (..)2017 TvShow: Game of Thrones Title: Beyond the Wall Season: 7 Episode 6