Not sure if the door is in the incorrect position graphically, or I was just allowed to place the door incorrectly.
I see the graphic that the door is opening and closing as villagers go through it, but they’re not going into the house so I am going to assume that I was allowed to place the door in an invalid position.
What you sometimes see is people trying to use the place item tool to add a door after the fact and it doesn’t work out well (no hole in wall, no entry to building). If you use the build tool to turn on “building plan vision”, can you see the ghost of a door in the hole?
It does sound like something wierd happened there. Did you make the building from a default template, make your own template and then use it or make the building from scratch?