What is anticipated in advance. Expectations shape what is noticed, which is why surprises are informative.
Latin exspectare, ex- (out) plus spectare (to watch), from specere (to look).
Its root is a watching, not a guessing: exspectare named an active looking-out for something to arrive. An expectation is that same watch kept running in advance, and it is exactly what gets caught off guard when the watch turns out to be looking the wrong way.