In contrast to generated column, which are evaluated when the next row from the result set to be inserted, currently default values and identity columns are generated "early", that is as part of avaluating the subquery (SELECT or VALUES as the case may be).
This does not currently cause a user visible bug in Derby, but it lies behind
DERBY-3 and the effect Bryan observed in DERBY-4.
Additionally, "early" computation has given rise to much special handling and ensuing bugs, cf.
DERBY-1644, DERBY-4413, DERBY-4419, DERBY-4425 and others. DERBY-4397 requires this fix for correct behaviour with INSERT.