Extension of Riemann integral onto bounded set is well-defined I am reading the following from Analysis On Manifolds by Munkres.

The proof on the next page concludes $L(f,P) \leq \int_Q f$ and that, by a similar argument $U(f,P) \geq \int_Q f$, so we're done (since the partition P is arbitrary), which I have no issue with.  I also have no issue with the fact that either both the integrals must exist or neither exists, or why we may assume WLOG $Q \subseteq Q'$. 
My question is why when we begin with a partition P of Q, why we need to consider P", which adjoins to P all the end pts of the component intervals of Q.  Note the statement "If R is a subrectangle determined by P" and R is not contained in Q, then f vanishes at some pt of R, whence $m_R(f) \leq 0$ (I should point out here $m_R (f):=inf_{x \in R} f(x)$).  Wouldn't the same statement be true if we never used P"?  Also, given our construction of P", aren't all rectangles determined by P" either a subset of, or disjoint from Q?
Many thanks in advance.
 A: The author is trying to show that $L(f,P) \leqslant \int_Q f.$  Recall that $P$ is a partition of the larger rectangle $Q'$ -- not $Q$ -- and may not induce a partition of $Q$. Such an induced partition is needed for the purpose comparing $L(f,P)$ to a lower sum over a partition of $Q$ -- ultimately leading to the desired inequality. 
By refining $P$ with end points from $Q$ we obtain a partition $P''$ that can be decomposed as $P'' = P_1'' \cup P_2''$ where the interiors of subrectangles in $P_1''$ are disjoint from $Q$ and the interiors of subrectangles in $P_2''$ are contained in $Q$.
Now we have $L(f,P'') = L(f,P_1'') + L(f,P_2'')$ by virtue of the aforementioned decomposition.  Furthermore, we can be sure that $L(f,P_2'')$ is a true lower sum for the integral over $Q$.  Hence,
$$L(f,P_2'') \leqslant \int_Q f.$$
This was hidden in the proof, which implicitly explains why $L(f,P'') \leqslant L(f,P_2'')$ by referring to $m_R(f)$ where $R \subset Q$. Such $R$ are actually the subrectangles in the partition $P_2''$.
Finally, since $P''$ is a refinement of $P$ we have 
$$L(f,P) \leqslant L(f,P'') \leqslant L(f,P_2'') \leqslant \int_Q f$$. 
