The first is that the car is packed and there is absolutely no other place to stand.
The second is that you know that the door in front of which you stand will NOT be opening at the next stop so you will not be getting in anyone’s way.
The third and final reason for standing in front of the door on the T is that you will be exiting at the next stop and are in front of the door to expedite not impede the process of getting off and on the train.
Oh, wait, there is another reason that someone would stand in front of the door on the T. Hmmm. What’s the best way for me to articulate it? That reason would be that the person standing in the doorway is really stoopid and/or really rude.
The people who ride the T: another reason to avoid using it whenever possible.