It can be justified by common sense, specific to a particular situation, to the point where an inspector will normally accept it. It can never be technically legitimized to the point of being absolutely code compliant down to that last 1/4" of NM that is required in the box. Silly technicality, what?
E.g., If you could easily have created a junction inside the building, it might not be accepted. You shouldn't even try it in that case. If however, it was practically impossible to create an indoor junction, it will likely be viewed by an inspector as within his authority to allow. However, if you didn't land it in a weatherproof OR waterproof box, it would likely be shot down, even if there was a roof over the area.
It's a low risk gamble with good odds favoring a common sense approach.
Edit, I'm not saying an inspector on NEW construction, with open walls, will let you run NM to the exterior under any circumstances. Most won't... you should use the proper cable (or conduit/wire) from the last junction or source. That means I wouldn't advise the OP to try it... he is making a new run from the panel... use UF or conduit with thhn/thwn wire.