Why did the doctor tel me this?

My last period was 14august and the doctor told me I would be just over 5weeks pregnant ? But I didn’t have sex then [im so new to all this]