Core contains a bunch of code for allowing direct reference to external images which isn't used in WMF production. This code isn't currently supported by Parsoid either (T75581).
This could be replaced by a small hook to validate an image URL, and moved out of core into an extension.