Doors are objects that can keep out wild animals and slow down other enemies as they must they break it down before they can pass.
Spiders can climb over walls so doors aren't going to effectively stop them unless it leads to a enclosed room.
Fence gates are a notable exception to 'security' doors. They fit aesthetically into fences but, like standard fences, do not stop enemies from entering.
Possible Bugs Edit
In beta version 1.71 enemies that break down doors will charge at doors when they see them and continue to attack the door until they break, sometimes even when something is attacking them. This can obviously be exploited to kill enemies