I assume you know that it's pretty easy to show that in any base, some rationals will have terminating expansions and others won't. And that the ones that terminate are related to factors of the base -- just as in base 10, any rational a/2^n or a/5^n terminates, because 2 and 5 are factors of 10.
So do you mean why? Are you looking for some underlying reason? It's really just a function of the long division algorithm and the factors of the base. It's a homework exercise in undergrad number theory; no great mystery.