For prime $p$ coprime to $10$ you have by Fermat's little theorem
that $p ~| ~[(10)^p - 1].$
This means that there exists an integer of the form
$d_{p-1}(10)^{p-1} + d_{p-2}(10)^{p-2} + \cdots + d_0(10)^0$
where
$d_{p-1}, d_{p-2}, \cdots d_0 \in \{0,1,\cdots, 9\}$
such that
$\displaystyle \frac{1}{p} = \frac{d_{p-1}(10)^{p-1} + d_{p-2}(10)^{p-2} + \cdots + d_0(10)^0}{(10)^p - 1}.$
Further, any fraction of the form
$\displaystyle \frac{d_{p-1}(10)^{p-1} + d_{p-2}(10)^{p-2} + \cdots + d_0(10)^0}{(10)^p - 1}$
will have a decimal representation of
$0.\overline{d_{p-1}~d_{p-2}~\cdots~d_0}.$
Therefore, for any prime $(p)$ coprime to $(10)$, the (infinite) decimal representation of $(1/p)$ will either have a period of $(p - 1)$, or a period of $k$, where $k$ divides $(p-1)$.
The only time that the period will be $k < (p-1)$ is if
$p$ happens to divide $[(10)^k - 1]$.
$(7)$ (for example) is not a divisor of either $(99)$ or $(999)$. However, $(13)$ which you know has to be a divisor of $[(10)^{(12)} - 1]$ also happens to be a divisor of $(10^3 + 1)$.
This implies that $(13)$ is a divisor of $(10^3 + 1)(10^3 - 1) = (10^6 - 1).$
This explains why the decimal representation of $\frac{1}{13}$ has a period of $(6)$, rather than $(12)$.
Addendum
An example of an unusual way of using the above analysis is to use it to indirectly conclude that the fraction $(1/11)$ has a period of $(2)$.
This can be reasoned directly simply by noting that $11 ~| ~99.$
The (convoluted) indirect way is to notice that the period of $(1/11)$ must either be $(10)$ or a divisor $k$ of $(10)$.
Further, you know that $11 ~| ~[(10)^3 + 1].$
This implies that $11 ~| ~[(10)^6 - 1].$
This means that the period $k$ of $(1/11)$ must be a common divisor of both $(6)$ and $(10)$. This allows you to indirectly conclude that $(k) = 2.$