Using flex for that final bit is a trade practice. One of those habits we get into....

The last few transformers I have installed have had the cores suspended inside, not rigidly attached to the case. With that sort of construction, it is likely that things will be just fine without that bit of flex. At least from a vibration point of view.

I still like having some flex in there. If nothing else, it allows for the unforeseen complications ... like the transformer being replaced, or shifting when a forklift bumps it, etc.