Clouds moving in opposite directions
This indicates that there was wind shear. Wind can change direction and speed with height. 

Since air is a fluid, it's wind vectors can change with height. On a large scale, this is called the thermal wind balance. In the ocean, it is Ekman balance. On smaller scales, there isn't really a term that I know of that describes the balance, because it is rather turbulent.

As far as "How could this happen": What you saw was the mean flow over the height of one cloud, followed by the mean flow over the depth of another cloud.