In some cases, what looks like an infinitive of purpose is, in fact, NOT one, but rather a way to indicate a sequence of actions.
Study these examples:
The patient woke up to see her sitting by the bed.
The workers went on strike to be arrested by the police.
They arrived at the port only to find that their ship had gone.