Both the door and trapdoor are blocks which are three pixels thick. It is possible to place a door on top of a closed top-half trapdoor. When said trapdoor is opened, the door will pop off, which makes sense in most cases, as the door block simply cannot exist without support. However, the door will still pop off even if said trapdoor is aligned to the same block face as the door, which would mean it has just enough space to support it. One would expect the door to not pop off in this case, and also be placeable.
For similar reasons, it is not possible to place doors on top of other doors.
Linked issues
Attachments
Comments


Recreated in 1.14.1.

Happens in 1.14.2-Pre-release 3
Can confirm in 20w51a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 1.17.
Can confirm in 1.17.1.

The door no longer has the required support.
Was able to re-create this on Minecraft 19w14b.