Why does expanding $\lim_{p \rightarrow 0}\frac{1-p-(1-p)^3}{1-(1-p)^3}$ give a different limit from just substituting? $$\lim_{p \rightarrow 0}\frac{1-p-(1-p)^3}{1-(1-p)^3}$$
$$= \frac{1-0-(1-0)^3}{1-(1-0)^3}$$
$$=\frac{0}{0}$$

$$\lim_{p \rightarrow 0}\frac{1-p-(1-p)^3}{1-(1-p)^3}$$
$$=\lim_{p \rightarrow 0}\frac{p^2-3p+2}{p^2-3p+3}$$
$$=\frac{0^2-3(0)+2}{0^2-3(0)+3}$$
$$=\frac{2}{3}$$
Edit 1: 
$0\le p \le1$

A little bit of context:
Let $f, g$ be continuos in  $D$, $a \in D$, and $g(a)\not =0.$
Then $\lim_{x \rightarrow a} \dfrac{f(x)}{g(x)} = \dfrac{f(a)}{g(a)}$.
Your functions $f$, in the numerator,  and g, in the denominator, are continuos but : $g(a)=0$!!.
Hence the above is not applicable.
Another example:
$f(x)=x$, $g(x) =x.$
Does   $\lim_{x \rightarrow 0} \dfrac{f(x)}{g(x)}$ exist?
