This isn't really true. There's actually a mathematical discipline devoted to treating statistical algorithms as black boxes, and assessing their accuracy/generalizability based solely on test data/broad intrinsic properties of the algorithm (e.g. continuity parameters).
It's called "machine learning".
From what I can tell, the fundamental distinction between machine learning and statistics is that machine learning provides mathematical guarantees based solely on black box testing of algorithms and very broad properties of the distribution/algo. In contrast, statistics cares about the actual underlying process.