You've discovered another "bug" in SE4 that isn't in code, but instead in the text file description. You can add this to "nowhere does it say the ringworld must be built on a star" and "I blew up all the engines, and the self destruct device still worked"
You must have resources to cover maintenance. If you don't you lose ships or units -- even though units don't need maintenance.
"Stay in the black, or lose something, no discussion {clicky}"
SJ changed the text description in his Pirates and Nomads mod, it says "The units were scrapped for spare parts" Which is really what happened ... you got to keep a ship for one more turn by losing units instead, maybe that's a bargin?