How can I better improve this question? This was well-received in Philosophy SE but not here. Say I ask about Catholic opinion. Will that work?
There are two core problems with the question, in my opinion:
It doesn't define a doctrinal scope.
There are wide-ranging responses to this philosophy (or others like it). As a simple example, let me mention war (as it is naturally a common subject to which this philosophy is applied).
There are many Christians who subscribe to the Just-war theory (as a subset of "That which is necessary is moral."). There are many other Christians who outright reject war under all circumstances.
One might make the argument that both groups adhere to the "That which is necessary..." philosophy, but have different definitions of "necessary." And that brings me to my second point...
It's a question of philosophy, which is off-topic.
It's easy to see how a discussion of this philosophy will quickly turn into a discussion of "how does one define necessary?" Which easily turns the philosophy back on itself, by applying the No true scottsman fallacy.
Stated another way, it's always possible to define "necessary" to fit your own pre-conception of morality, thus rendering the philosophy meaningless, except perhaps as a means of self-justification.
So ultimately the answer to the question (regardless of theological background) comes down to a philosophical definition of "what is necessary" (the existing answer addresses this). I believe this makes the question off-topic, unless some specific Christian group has directly addressed this issue, in which case we can answer based on that address, rather than on reasoning. But that leads back to my first point above. :)