You might find it strange that "P only if Q" is formalized as (P→Q).
Again, perhaps an example might help. Suppose a teacher says to a student,
"I don't know whether you will pass or not. But you will pass only if
you take the exam." The teacher is of course *not* saying that if the
student takes the exam, then he will pass. Rather, all we can infer is that if the
student does pass, then he has taken the exam. Or equivalently, he won’t pass if he does not take the exam.