Consider the following, "if A then B" implies "A only if B". For example, take "if it is raining, the sidewalk will be wet,". Therefore, "it is raining only if the sidewalk is wet."
The first expression is straightforward, but what about the second? Only if the sidewalk is wet, is it possible it is raining. This does not mean other things, such as a water hose, cannot make the sidewalk wet, rather if it's wet, only then is it possible it is raining.
So, what is the relationship between "if A then B" and "A only if B"? In other words, does the first expression guarantee the truth of the second?