This methodology does not always work. It worked out this time because you divided both numbers by a base 10 multiple of 2 and the greatest common prime factor was greater than 2.
However, consider 1010 (10 in base 10) and 100 (4 in base 10). The largest common prime factor in base 10 is 2.
If you simplify in binary in the same manner as you did for this question, you get 101 (5) and 10 (2). Now the numbers don't share any prime factors. You "took out" the 2 when you simplified.