Are professors supposed to leave the door open or closed when you talk in their office?

I heard someone say they should leave it open if a student comes in which looks more proper.

But when I go visit one he always slams the door closed behind me. We aren't talking about anything highly confidential.

Why could this be? None of my other teachers or advisers do this besides for him.
Are professors supposed to leave the door open or closed when you talk in their office?
Post Opinion