Without the flag, a malformed document returns null, which is indistinguishable from a document containing the literal null.
json_decode('{bad}'); // null
json_decode('null'); // null
json_last_error(); // the only way to tell
json_decode('{bad}', flags: JSON_THROW_ON_ERROR);
// JsonException: Syntax error
// and the depth limit, which is 512 and silently truncates
// without the flag:
json_decode($deep, flags: JSON_THROW_ON_ERROR);
// JsonException: Maximum stack depth exceeded
The ambiguity is the whole problem: a decode that returns null gets treated as an empty document and the failure appears somewhere else with no reference to the parse. The depth limit is the second reason for the flag and is the one nobody expects, because it triggers on a deeply nested but entirely valid document — a webhook payload from a system with a different modelling style, for instance.