Normally interior doors get installed after the drywall is hung taped and finished. One of the biggest advantages is your doors will stay cleaner and will be less likely to be damaged. Drywall hanging and finishing can be messy. You could end up with drywall mudd on the finished surface of your doors. Not to mention the dust from sanding is very fine and will end up in every nook and cranny of the doors.
A good sequence to follow would be:
- Electrical, Plumbing and Heating
- Drywall - Tape and Finish
- Install Doors and Trim
Sometimes 4 and 5 can be reversed. If your doors and trim are to be painted, many painters perfer the doors be installed. That way all the painting and caulking can be completed at the same time. If you have pre-finished doors and trim. I would recommend installing the doors after the finish painting. You will need to be careful of the walls as you won't want to damage the fresh paint.
That being said, often times, such as a storage room or in a partially finished basement, there will be one or both sides of a door installation that won't have drywall installed.