It is a good idea to paint every side and edge of an interior door, even if you think it will be open against a wall most of the time. This is because paint acts as a protector and will create a seal against moisture being absorbed into the wood of the door - if this happens, the door can swell and warp so that it no longer fits in the door frame correctly.