Its offical a bug or game mechanic?

I’m not sure if I understood correctly, but foundations can be stacked on top of each other and they also can be put on top of ceilings. Those are perfectly legitimate building techniques.

Also, here’s a nice thread on advanced building techniques: