The prologue chapter wasn’t the first time 2B and 9S met. She’d already killed him dozens (if not hundreds) of times by that point. It’s her job – to kill 9S every time he stumbles upon the truth about androids and the YoRHa project. And every time he comes back, his memory of her is wiped so he thinks they’re meeting for the first time.
It’s why 2B acts so distant and no-nonsense with him.
Edit: Regarding E-type androids, if you rewatch the approach scene where all 2B’s compatriots get shot down by the giant laser, you might notice something interesting.
One of the sidequests involves a request from an android number 16D at the Bunker, who asks you to find her partner, 11B, which was one of the units that got shot down. When you find her corpse, you can access some of her memory logs, which show that she had been planning on deserting YoRHa. In the approach scene, one of the units present is a “7E”, which suggests that YoRHa knew about the planned desertion and 7E was put there to watch 11B and execute her if necessary.