The other factor is that some exits clear faster than others. Forward doors on large aircraft generally clear faster because there are fewer people in those sections. Window exits clear slower because of the mechanics of getting yourself out.
So even if you are closer to the windows ahead of you, than the door behind you, the door may be the most efficient exit.