As to your question a to whether a hydrophobic compound can also be
hygroscopic, the simple answer is "yes to a point." Organic compounds
can elicit both behaviors simultaneously when they have varying
functional groups with a wide enough separation. BioDiesel is an ester
with a very short side and a long side, the short side can exhibit
polar qualities due to the presence of oxygen while the long chain
exhibits nonpolar qualities. The polar side is what attracts the
water, while the long chain repels the water. Cells of living
organisms utilize a similar method to control the amount of materials
crossing the membrane. I hope this explanation helps. Das Nerd 20:08,
28 October 2006 (UTC)
The composition of petrol diesel is very different, that's why it is not as hygroscopic as biodiesel.
As far as I know hygroscopy depends mostly on polarity. The water molecule is a polar, so it likes to mix with other polar compounds, like KOH, glycerol, salt, sugar, H2SO4, etc. Apolar compounds repel water. Air consists mostly of apolar components, so when the water in the air meets with polar things like sugar, it starts to move to that phase, because it has lower energy in there.
E.g. silicagel which is a common desiccant has this structure:

where you have polar $-OH$ chemical groups on the surface, that's why it is very hygroscopic.
While silicone oil contains molecules with this structure:

where you have apolar $-CH_3$ chemical groups on the surface, which makes it not hygroscopic.