Can mountain bike dirt remaining on different parts for long time damage the bike? My mountain bike is dirty from dust, mud and oil. Does it do any harm to the parts if I leave it dirty for a few more months - and for the sake of background information - or forever? I can imagine the granulate part of sand doing harm to the transmission (3x9 Deore XT), however that already happens if the mud splashes on it during the ride and the effect should wear off after some kilometers.

I'm interested on the effect of the varnish of the frame as well as dust entering into rotating parts (usually all embedded in an axle bearing) or the suspension fork. In order to remove oil film I need to use a degreasing product which might do more harm to those parts than the dirt remaining on it. Cleaning techniques involving pressured water might increase this effect.

Having clean tires is probably a good advise for security reasons/grip, but the combination of profile and my tracks causes them to become clean pretty much automatically.

The ideas should apply to other bike types as well.
The main concern is water, and any other substance that might promote corrosion, such as road salt.

Leaving mud or dirt on the frame provides material for water to soak into. Even if you let it dry out it would held water for longer than it would take to evaporate otherwise, and can soak up more water later.

You obviously want to get grit and dirt off of your chain and sprockets as it sticks to the lubricant and promotes wear.

Bearings do have seals, so if you are careful with degreaser there should not be a problem  getting it into bearings and affecting the grease or other lubricant.

Update:

As brought up in comments there are areas that are more prone to damage through corrosion than others. Fork stanchions in particular.