I'm not sure why ceiling tiles sometimes disappear below properly placed floor tiles. It is super-annoying.
I think the other issue of ceiling tiles sometimes happening when there is no floor tile above, is caused by there being items above which want a floor tile or would restrict the deletion of a floor tile if there was one. Windows are irritating for that - can't delete a floor tile, the window needs it. No! Windows need walls, silly program! Using moveobjectson can also cause the issue if you moved something out into space it wants to generate floor tiles/ceiling tiles, so you'll get that issue.
Using a foundation or friezes can cause the severely sloping secret ceiling tiles, too.