Per Burrough J. in Richardson v Mellish (1824) 2 Bing. 229 at p.252:
If it be illegal it must be illegal either on the ground that it is against public policy, or against some particular law. I, for one, protest… against arguing too strongly upon public policy; a very unruly horse, and when once you get astride it you never know where it will carry you. It may lead you from the sound law. It is never argued at all but when other points fail.
Per Lord Atkin in Fender v St John Mildmay  AC 1 at p.5:
the doctrine should only be invoked in clear cases in which the harm to the public is substantially incontestable, and does not depend upon the idiosyncratic inferences of a few judicial minds. I think that this should be regarded as the true guide. In popular language, following the wise aphorism of Sir George Jessel cited above, the contract should be given the benefit of the doubt.