We've a piece of dielectric parallel to the polarisation $P$ , in two cases as in the figure we take a slice of it, one a perpendicular cut the other an oblique one.
The charge on the surface $q$ is said to be the same for both cases ,why is that so?
Here is the full paragraph from griffiths
To calculate the actual amoumt of bound charge resulting from a given polarization, examine a "tube" of dielectric parallel to $P$. The dipole moment of the tiny chunk shown in Fig $4.12$ is $P(A d)$, where $A$ is the cross-sectional area of the tube and $d$ is the length of the chunk. In tems of the charge $(q)$ at the end. this same dipole moment can be written $q d .$ The bound charge that piles up at the right end of the tube is therefore $$ q=P A $$ If the ends have been sliced off perpendicularly, the surface charge density is $$ \sigma_{b}=\frac{q}{A}=P $$ For an oblique cut (Fig. $4.13$ ), the charge is still the same but $A=A_{\text {end }} \cos \theta$, so $$ \sigma_{b}=\frac{q}{A_{\text {end }}}=P \cos \theta=\mathbf{P} \cdot \hat{\mathbf{n}} . $$ The effect of the polarization, then, is to paint a bound charge $\alpha_{b}=\mathrm{P} \cdot \mathrm{n}$ over surface of the material. This is exactly what we found by more rigorous mearis Seet. $4.2,1$. But now we know where the bound charge cames from.