Couple things... it looks like you are using the maxscript listener to write your scripts. I think you'd be better off not doing that since not everything get posted to there like it does in Maya.
I find it easier to write simple scripts based on the samples included in the Max Script Reference doc. there's a lot more exposure than what gets posted through the listener.
On your script it looks like you are detaching the faces to "door01" as the new object name, therefore the result is two objects named "door01" when you do a select for this object by name it's going to grab the first one created (original object).
I would look into the polyOp structures in the reference for perhaps better way to do this...
polyOp.detachFaces \
delete: asNode: \
name: node:
Detaches the specified faces. If is true, the faces are deleted after being detached. If is false, the faces are not deleted. If is true, the faces are detached as a separate node. If is false, the faces are detached as an element in the poly. If is true, specifies the name of the new node. If is true and is an Editable Poly (not a node), must be specified. Returns true if the operation was successful.