Let $W^{m,p}(\Omega) = \{ f \in L^p(\Omega): D^\alpha f \in L^p(\Omega) \text{ for multi-indices } |\alpha| \leq m\}$, where $D$ denotes the weak derivative. Let $W_0^{m,p}$ denote the closure of $C_c^\infty(\Omega)$ in $W^{m,p}(\Omega)$.
Why is it true that $W_0^{m,p}(\mathbb{R}^d) = W^{m,p}(\mathbb{R}^d)$, but in general $W_0^{m,p}(\Omega) \subsetneq W^{m,p}(\Omega)$?
I am trying to understand why there is a need to consider $W_0^{m,p}(\mathbb{R}^d)$. I'm guessing it's because the elements in $W^{m,p}(\Omega)$ can get really messy, but I don't have very good intuition about both spaces.
The difference between $W^{m,p}$ and $W_0^{m,p}$ is not merely a technical one. The idea of the space $W_0^{1,p}(\Omega)$ is that it consists of those functions in $W^{1,p}(\Omega)$ which take the value zero at the boundary of $\Omega$. For general $W_0^{m,p}$ ($m>1$) the derivatives up to order $m-1$ have to be zero at the boundary as well. Since the boundary of $\mathbb{R}^n$ is empty it makes sense that $W_0^{m,p}(\mathbb{R}^n)=W^{m,p}(\mathbb{R}^n)$.
Now to define what it means to restrict a Sobolev function to the boundary is not straightforward, because the boundary has measure zero and $L^p$-functions are in fact equivalence classes of functions, that is, they are only defined up to sets of measure zero.
The simplest way out of this is to use the definition you gave (closure of compactly supported smooth functions). It has the advantage that it is easy to work with. The drawback is of course that it is not obvious that the definition really captures the intended notion of zero boundary values.