The two do not necessarily have the same truth values. "Implies" is not a commutative operation.
"If it is raining, then there are clouds" does not have the same truth value as "If there are clouds, then it is raining".
We can re-interpret "If P then Q" as meaning "P being true and Q being false can not happen." Any other combination of their truth values can. That is, "It can not be the case that P is true and Q is false."
That is, "it can not be the case that it is (at the same time) raining and that there are no clouds."
This is not the same as "it can not be the case that there are clouds and that it is not raining."
Clearly in this case (with this particular assignment of statements to P and Q):
does not hold.