This can happen with certain building types. It affected one, or possibly two of the Dutch buildings introduced in Market-Garden. And unfortunately they were then used in Final Blitzkrieg. If the building is on it's own troops will bypass the door and enter through the side wall. However things can be even worse if the building is used in a row with others, as the troops will exhibit the behaviour that you describe.
Perhaps you could give some examples, i.e. QB, Stand alone battle, campaign etc