There's no such thing as Terminal 4 at SFO. It sounds like they meant the International Terminal, where EI currently departs and arrives, but it makes little sense to arrive into one terminal and depart from another, especially given the short turnaround time.