Why does unpeeled fruit rot? Generally, pathogens does not enter into fruits even if plant is irrigated with contaminated water (Link). Hence , an unpeeled fruit should not have pathogen inside to rot it. Why does then an unpeeled fruit rots ? Does a rotting fruit is caused by pathogens ?
Rotting occurs as cells break down and autolyse together with other chemical reactions and aided by microbial (fungal and bacteria) contamination.  It is not initiated by pathogens, but is rather a normal cause of events.

Note that ripening (i.e., the earliest stage of rot) and fermentation (e.g., beer and kimchi) are related processes performed under controlled conditions