Why does the displacment vector change in cavity? Consider the situation where we have a dielectric, in which there is an electric field $\vec E_0$ we then hollow out a cavity in the dielectric. These notes:

Physics 217 Lecture Notes: Electricity and Magnetism I, chapter 4 (Frank L. H. Wolfs, University of Rochester, 2001).

in section 4.3 indicate there is a change in the displacement vector $\vec D$ in such situations. Why is this so?
Here are my thoughts:  We haven't touched the free charges only the bound charges, so the field due to the free charges won't have changed and therefore neither the displacement vector.
 A: The electric displacement is given by
$$
\mathbf D=\varepsilon_0\mathbf E+\mathbf P,
$$
and it can change if either of $\mathbf E$ or $\mathbf P$ changes. In this case, $\mathbf P$ is zero inside the cavity, so that $\mathbf D=\varepsilon_0\mathbf E$, but the electric field inside the cavity is also different from the field $\mathbf E_0$ in the bulk of the dielectric away from the cavity, so you're not guaranteed a nice relationship between the displacement inside the cavity and the bulk displacement $\mathbf D_0=\varepsilon_0\mathbf E_0+\mathbf P_0$. Because of the symmetry of the system (uniform polarization, spherical cavity), the relationship turns out to be fairly user-friendly, but there was no requirement that there be a special relationship in the first place.
A: The problem is that you are assuming that a polarized material won't change the displacement vector. That is not true, for example consider a permanently polarized bar (polarization can be non-zero even without an applied electric field, like the electric case of a permanent magnet). Then the fields will look like this (keep in mind the integral equation for D which must be zero):

The rectangles are surfaces that enclose the polarization charges. For D the surface integral must be zero, while for E it depends on the enclosed charge.
$\vec{P}$ is imposed as a permanent polarization. $\vec{E}$ must point away from positive charges and towards negatives. The value of $\vec{E}$ inside the the material depends on the hysteresis cycle, but it will always be such that $\int \vec{E} d\vec{l} = 0$ since $\nabla \times \vec{E}=0$ everywhere (static case). $\vec{D}$ then follows those two. Outside the bar it must be equal to $\vec{E}$ since $\vec{P}=0$ there. Inside it, $\vec{D} = \epsilon_0 \vec{E} + \vec{P}$, but the direction can't change since there are no free charges: $\int \vec{D} d\vec{A}=0$ everywhere. One way to think about it is that $\vec{D}$ must make up for the fact that $\vec{P}$ is zero outside, while $\vec{E}$ alone can't do it because it must at the same time satisfy $\int\vec{E}d\vec{l} = 0$. If $\vec{E}$ was equal to $\vec{P}$ inside then that integral would be clearly non-zero.
The reason why stuff like this happens is because D doesn't follow a Coulomb law like E. Same with P. This is because, in the static case:
$\nabla \times \vec{D} = \nabla \times \vec{P} $
which is not zero in general (you can think about this considering line integrals to see it more clearly).
Another way to look at this (although not really, we are just deflecting the question) is by analogy with the magnetic case, even without "free currents" you can have an H if you place a permanent magnet nearby. 
A: I was having this exact same problem while solving this(Problem 4.16 in Griffiths EM), I think the confusion arises from the fact, that you (I was doing this so I think you might be stuck there too) are assuming that the relation $\mathbf{\nabla \cdot D =}\rho_{f}$ completely describes the vector D, but it isn't, as the Helmholtz Theorem says you need both the div and curl in general to know a field, turn it around it says lacking knowledge of either one makes it insufficient to determine D completely, which forces you to use the simple relation $\epsilon_{0}\mathbf{E + P = D}$, in that order, that is extract E and P first, then get D.
I have scratched my head for long for this problem too, here's the solution, as pointed by others too(which I found helpful too for my own understanding, before attempting to write an answer here).
Notice, $\mathbf{\nabla \times P = \nabla \times D}$, now visualise this: the P is irrotational(P is zero) inside the cavity, you step out of cavity, boom it's rotational (atleast in general case), thus you are correct when you say that charge distribution of bound charges doesn't affect div  of D, but they do affect curl of D, which is also required to be able to find the field completely.
