Dr. Robert jr. was a smart man. Each day as he walked by the loud, squeaky door he clenched his teeth and made a horrible sound that could easily scare off any visitor. Although Sir Robert was very smart he never managed to understand why that door squeaked only when he walked past it. Everytime his beautiful, polished, black shoes walked past that door it would make a loud screech. No other hospital vistor or staff new either, until one very bright but foggy day the answer was finally found.
The purpose of personification in the above excerpt is to give human characteristic to death which is considered to be a non human. Writers usually use personification in their write ups in order to bring an inanimate objects to life so that their actions and natures will be better understood.