Placing doors is not prohibited when any entity is in the way, which is inversely to how placing blocks is prohibited when an entity is in the way. Instead, the affected entity is moved to the closest free area.
Steps to reproduce
Spawn a mob
Place a door at their feet
Video Example
Related issues
relates to
Attachments
Comments

[media]

Is this a bug? I think that's a feature!

That's not likely. See the related report MCPE-39674.