Regarding the formation of depletion region,it forms because free electrons diffuse into p region from n region. after some recombination of holes, a sufficient potential difference is set up to prevent further diffusion. Now, consider the region to the left side of juction(whole P region including depletion layer.) only as shown in figure. It contains layer of negatively charged ions to the right and holes everywhere else.Now, what stops a diffusion current to set up in the P region only, which has the effect of distributing the holes evenly in the P region,(i.e. electrons present in negatively charged ions diffuse further into the P region ) since there is a definite concentration gradient of holes in the P region due to the depletion region.?