This can have several causes:
1. In 90% of cases, this is because the intermediate wall between the two spaces is composed of multiple walls. The spaces are interpreted as being adjacent to separate wall, and the model cannot properly resolve the geometry. This can be solved by making the intermediate wall a single wall composed of several elements.
2. There may be a lift shaft which is not defined as a "space". This creates a gap between two rooms.