The GGX NDF, as it appears on the paper where it is presented is:
$$D(m)=\frac{\alpha_g^2\space\chi^+(m\cdot n)}{\pi\cos^4(\theta_m)(\alpha_g^2+\tan^2(\theta_m))^2}$$
It is equivalent, in the range $[0,\frac{\pi}{2}]$, to the following formulation (notation simplified by me):
$$D(m)=\frac{\alpha^2}{\pi(\cos^2(\theta)(\alpha^2-1)+1)^2}$$
by finding the derivative of the inverse of the expresions used for importance sampling ($\theta_m=\arctan(\frac{\alpha\sqrt{\xi_1}}{\sqrt{1-\xi_1}})$ and $\phi_m=2\pi\xi_2$) presented in the same paper we can derive the following PDF:
$$p(m)=\frac{\alpha^2\cos(\theta)\sin(\theta)}{\pi(\cos^2(\theta)(\alpha^2-1)+1)^2}$$
When finding the corresponding PDF for, for instance, the Blinn NDF the only difference is a $\sin(\theta)$ in the numerator that comes from the fact that the NDF is a distribution over a hemisphere. So where does the $\cos(\theta)$ factor in the GGX PDF come from?
I think it is explained after formula (37) in the paper but i don't understand the reasoning behind it.
PD:here are the Blinn NDF and PDF as i understand them for reference
NDF: $\frac{n+1}{2\pi}\cos^n(\theta)$ --- PDF: $\frac{n+1}{2\pi}\cos^n(\theta)\sin(\theta)$
EDIT: here is a link to the paper in case it makes the question easier to answer