while this is generally the intention, unfortunately we're not always there yet.
i know that lemmy <-> piefed already works, but private messages between lemmy and mastodon users for example do not currently work, and there is also currently no indicator that those messages never were delivered. for lemmy <-> mastodon, this is tracked in https://github.com/LemmyNet/lemmy/issues/2657 and there is work going on right now to resolve this incompatibility.
I haven't seen the actual error message displayed, but "failed external validation" is definitely how the scanning process works.
By illegal we are not referring to copyrighted content or anything like that, only much more serious things.
Unfortunately, this will sometimes falsely identify content that should be allowed. In the past this would have silently erased the image shortly after the upload, with this only becoming noticeable days after the upload due to caching.