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: Because in general $\lim_{p\rightarrow a}\frac{f(x)}{g(x)}\neq \frac{\lim_{p\rightarrow a} f(x)}{\lim_{p\rightarrow a} g(x)}$ since the right expresion may not be defined (in your case you have $\frac{0}{0}$). To find (using highschool calculus) the value of a limit where $\frac{\lim_{p\rightarrow a} f(x)}{\lim_{p\rightarrow a} g(x)}$ is not defined you have to get the ration in such a form where the demoninator's limit isn't 0, as you have done in the second case.
A hint: Usualy what works with most polynomial limits is to divide both nominator and denominator with the the monomial $p^n$ of the highest degree apearing in the limit.
A: $$1 - p - (1 - p)^3=p^3-3 p^2+2 p$$
$$1 - (1 - p)^3=p^3-3 p^2+3 p$$
both are $0$ at $p=0$. You are removing the common factor $p$ in the expanded version, but not in the non-expanded version, which is why you "get a different limit" (or, more accurately, which is why you find the limit after expanding, but do not find the limit without expanding).
A: Expanding does not give different limits. Without expanding you arrived at an undefined situation. Whereas when you expand in some step $p$ cancelled out which is possible only if $p\neq0$. Since the expanded function is continuous at zero and $p\rightarrow0$ so correct limit is $\frac{2}{3}$.
EDIT: Moreover, $\lim_{p\rightarrow0}\frac{p}{p}=1$
A: 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?
A: You conveniently omitted the crucial step
$$\lim_{p \rightarrow 0}\frac{1-p-(1-p)^3}{1-(1-p)^3}$$
$$=\color{red}{\lim_{p \rightarrow 0}\frac{p^3-3p^2+2p}{p^3-3p^2+3p}}$$
$$=\color{red}{\lim_{p \rightarrow 0}\frac pp} \cdot\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}$$
The expression in red is clearly of the form $\dfrac 00$ too but will not be any more after you divide the numerator and the denominator by $p$. Functions that behave like that are said to have removable singularities.
A: The original function is a rational function in $p$, that is, it is a fraction of two polynomials $f(p)$ and $g(p)$. The roots $a_i$ are the values for which $f(a_i) = 0$, and similarly, the poles $b_j$ are the values for which $g(b_j) = 0$. If for some $i$ and $j$ you have $a_i = b_j$, then the factor $(p-a_i)$ on top cancels with the factor $(p-b_j)$ on bottom. The original function had $p\neq b_j$ since that would lead to a $0$ in the denominator, so even after cancelling this factor, we still have that $p\neq b_j$ regardless of whether we could evaluate the function at that point now. However, if we can evaluate the reduced function at $p=b_j$, then it will be continuous there (since rational functions only have holes and asymptotes as discontinuities). Then, since the function is continuous there, the limit of that function matches the value of function evaluated at the point $b_j$. Since the original function is identical to the new function for all $p \neq b_j$, the limit as $p\rightarrow b_j$ is the same for the original function as it is for the reduced function. This means that plugging $p = b_j$ in the original function will give you $0/0$ which is not the value of the limit, but after cancelling, plugging $p=b_j$ in the reduced function will give you the correct limit.
In this case you've given, $a_i = b_j = 0$, so you just cancel $p$ from the top and bottom, so that plugging $p=0$ into the reduced equation give you the limit of $2/3$.
A: There are a lot of correct answers here, but I think that there is a fundamental definition or intuition that is missing from all of them, namely that we should ignore the value of the expression at the limit point (i.e. we assume that $p$ is never actually zero; we are taking a limit as $p$ approaches zero).  A good definition of a limit is as follows:

Definition:  We say that $\lim_{x\to a} f(x) = L$ if for all $\varepsilon > 0$ there exists some $\delta > 0$ such that if $x\ne a$ and $|x-a| < \delta$, then $|f(x) - L| < \varepsilon$.

Topologically (and feel free to ignore this paragraph for now), we are saying that for any neighborhood $V$ of $L$, there is some punctured neighborhood $U^\ast$ of $a$ such that $f(U^*) \subseteq V$.  Because we are puncturing the neighborhood, the value of $f$ at $a$ is irrelevant.  We just completely ignore it.
In the original question, we are trying to compute
$$ \lim_{p\to 0} \frac{1-p-(1-p)^3}{1-(1-p)^3}. $$
As you have noted, when $p=0$, this expression is utter nonsense.  That is, if we define
$$ f(p)
 := \frac{1-p-(1-p)^3}{1-(1-p)^3}
 = \frac{p^3 - 3p^2 + 2p}{p^3 - 3p^2 + 3p} $$
then try to evaluate $f(0)$, this will give us $\frac{0}{0}$ which is a (more-or-less) meaningless expression.  However, we are trying to take a limit as $p\to 0$, which means that we can (and should) assume that $p \ne 0$.  Notice that under this assumption, i.e. the assumption that $p\ne 0$, we have that $1 = \frac{1/p}{1/p}$.  Then, using the analyst's second favorite trick of multiplying by 1 (adding 0 is the favorite trick), we have
\begin{align}
f(p)
&= \frac{p^3 - 3p^2 + 2p}{p^3 - 3p^2 + 3p} \\
&= \color{red}{1} \cdot \frac{p^3 - 3p^2 + 2p}{p^3 - 3p^2 + 3p} \\
&= \color{red}{\frac{1/p}{1/p}} \cdot \frac{p^3 - 3p^2 + 2p}{p^3 - 3p^2 + 3p} \\
&= \frac{p^2-3p+2}{p-3p+3} \\
&=: \tilde{f}(p).
\end{align}
Again, the vital thing to understand is that the computation is justified since $p \ne 0$, which means that the fraction $\frac{1/p}{1/p}$ is perfectly well-defined and is (in fact) identically 1.  Note, also, that the computations above are done before we've tried to take any limits. 
 It is now relatively easy to see that
$$ \lim_{p\to 0} f(p)
= \lim_{p\to 0} \tilde{f}(p)
= \lim_{p\to 0} \frac{p^2-3p+2}{p-3p+3}
= \frac{2}{3}. $$
There are two things here that I have left unjustified:

Exercises:
  
  
*
  
*Explain why $\lim_{p\to 0} f(p) = \lim_{p\to 0} \tilde{f}(p)$?  
  
*Explain why $\lim_{p\to 0} \tilde{f}(p) = \frac{2}{3}$.
  

Hint for 1:

 One possible argument is a one-line appeal to the squeeze theorm.

Hint for 2:

 Think about the relation between continuity and limits.

