They have knowledge about how programs can be structured in ways that improve overall maintainability, but little room to exercise that knowledge over the course of fulfilling the user’s request to add X feature.
They can make changes which lead to an improvement to the code base itself (without adding features); they just need to be asked explicitly to do so.
I’d argue the training objective should be tweaked. Before implementing, stop to consider the absolutely best way to approach it - potentially making other refactors to accommodate the feature first.
Hang in there, there will be a lot of slop to fix in contract work...