Why are flaps retracted when an aircraft is parked on ground?
A few different reasons:


Good pilots put the aircraft into a well-known (up) configuration after landing, so that the aircraft is ready for use on the next flight.
Flaps down during taxi was a signal to the tower that the aircraft had been hijacked.
Take-off flaps (10 degrees on my airplane) and landing flaps (45 degrees), are nearly always different, so leaving the flaps down after landing at, say, 45, doesn't save any steps for departure. If the pilots forgets to set flaps before takeoff, some aircraft (like mine) will make it almost impossible to depart and climb out on full flaps because of the induced drag, while takeoff with no flaps is possible.
Prevent trucks and people from hitting the flaps while the airplane is parked, especially in the full-down (landing) configuration.
Some pilots employ the practice of retracting the flaps during the rollout because it puts more weight on the wheels, reducing stopping distance.
Flaps down increases the amount of lift generated by the wing, so some aircraft might actually lift off the ground while parked with full flaps in high winds.