When placing a logistic cargo wagon on provide mode, but there is nothing there to accept the cargo, much of the cargo in the train "disappears". If you later add something or someone to accept the goods, they start coming out of thin air. I tried this on an isolated patch of track, with just a single locomotive, single purple logistic cargo wagon, and a roboport.
As soon as I click "provide" with an item in the train, it drops it down to a single stack size, everything else disappears. If I clear the provide request, the cargo is still missing.
If a roboport is present during this, it looks like logistic robots take stuff out of the train, or put it back, but if the robots are holding the items, just go back into the roboport with them holding the item??? There are no chests around.
I'm not exactly sure the problem I don't mod anything, but also if the cargo train is "providing", but there is nothing to provide to, the bots all hover between the train and roboport, holding items, freaking out.