Don't be surprised.

What was the ship's bearing? From the data you provided, I'd say somewhere from 270 to 300, which means you turned your broadside to the ship, and you were spotted.
I've been spoted from even greater distance. That's why I hate unlimited visibility, especially when combined with calm seas.