Rodger Ford suggests that the paperwork stems from a BR Era agreement which the government of the day did to buy the trains if they were every unnecessary for any reason. This was neccasary to convince BR to initiate the production in York, which the government wanted given the go-ahead for political reasons.
I doubt they ever thought they'd actually have to buy them.
Whilst this may stem from a BR era agreement, I'm afraid the rest of the information is incorrect.
Although BR's ships - and many other assets - were leased, Treasury rules prevented it from financing traction and rolling stock by this route (I think the class 50 procurement preceded the introduction of these Treasury guidelines); however, in the early 1990s BR was granted permission by the government to procure trains with a capital value of £150m by lease. A competition was held between GEC-Alstom and ABB, basically to see who could offer most trains for this value; GEC-Alstom offered IC225s for the WCML, ABB class 365s for Network South East - sorry, can't remember how many IC225s were proposed. The two offers were appraised, and investment in 41 x 4-car EMUs for NSE was deemed to give the best return; a complex leasing package was then established, and I THINK it was structured in such a way that ownership would transfer to BR after a period of 25 years.
This procurement/leasing exercise pre-dated the establishment of the ROSCOs. As part of the privatisation process,
"ownership" of the class 365s passed to Eversholt; however, these trains didn't belong to BR to start with, and therefore it's possible that Eversholt's ownership is
"faux", and they were really just lessors from the owners established as part of BR's original leasing package.
Ownership passed to the DfT roundly 25 years from when the original leasing package for the class 365s was established; however, it is possible this transfer of ownership is by
"accident" rather than deliberate. The British Railways Board continued to exist for many years after it ceased to be a railway operator, and it is possible that the
"deal" established with Eversholt as part of the privatisation process still envisaged that ownership would pass to it when the original lease period expired; however, much more recently the BRB has been wound-up, and I believe its remaining obligations were transferred to the DfT. If this is correct, this could be the reason for ownership of the class 365s passing to the DfT on 15 August 2019.
Keeping York Works open was just a fortunate coincidence, and did not feature in the tender evaluation process in any way.