One of the 39 forbidden Melachos on Shabbos is laundering (Mechabes). The Rabbis prohibited any step in the laundering
process - for example, even pouring water on clothing without agitating or rubbing it. In Talmudic times, laundering
frequently involved washing clothes in a river and beating them with sticks. After this was done, the clothes were generally
unwearable until they were folded and smoothed properly. Folding was therefore considered part of the laundering process,
and forbidden Rabbinically.
Interestingly, this prohibition only applies to old, previously laundered items. It is permitted to fold a new garment, since such
folding does not improve the garment in any way. Similarly, a new tablecloth can be folded on Shabbos. Folding old garments is prohibited even when it is not associated with laundering. We therefore do not fold a Tallis on
Shabbos on the original creases. Folding it against the creases does not improve the garment in any way, and is permitted.
Regarding folding trousers, Rabbi Y. Heinemann has ruled that although one should not deliberately fold them on the creases,
one can hold them at the top or bottom and put them down on the creases, or put them on a hanger in such a way that they
will hang on the creases.