Why is the N side thinner than the P side in a photodiode?
The texbook photo:

doesn't represent the real physical situation. I mean the actual sizes of the layers in relation to oneanother.
It is a simplified view that helps to explain what is happening in a PN junction.
This is a more realistic presentation:

found here
This is another more realistic sideview drawing:

found here
The reason why the N-type layer is much thinner than the P-type layer is due to the fact that the manufacturing starts with a P-type wafer.
N-type doping is then implanted into that P-type wafer which will turn a thin surface area of that P-type wafer into N-type.
In these drawings the P-type layer is much thinner than the N-type so the opposite of what you stated (N-type is thinner). Actually that doesn't matter, the manufacturer starts with the thick layer and then add doping to make the thin layer.
If you start with a P-type wafer, after adding N-type doping you will get a thin N-type layer.
If you start with a N-type wafer, after adding P-type doping you will get a thin P-type layer.
But it was P-type? Where did the all the P go?
Good question! If the doping of the N-type is higher than than the existing doping of the P-type it will overrule that doping. The P-doping is still there but &quot;overwhelmed&quot; by the N-type, making the surface N-type.