This was a door hung to be 'shut' when open, as I thought that might keep zombies out. Note that the hinges are on the left of the picture, but in the second image the door has opened as if the hinges were on the right.
See also MC-2053, which may be describing the same problem, but I find the phrasing too hard to follow to be sure.
Duplicate of MC-6851, please use the search function to see if your bug has already been submitted. Currently over 42% of tickets are being closed as duplicate.