As a kid, I was told that if you wear clothing backwards or inside-out then you will forget your Torah learning. What is the source for that claim, and why is that specific outcome tied to that practice?
There are two statements about clothes that are normally brought together, and are therfore often confused (see here as an example).
Shulchan Aruch Orach Chaim 2:3 - One should be careful to put on his shirt the right way, and not wear it backwards. The Magen Avraham (S"K 3) explains that (based on Rashi Shabbat 114A) if the disgusting stitches are facing outwards people will see them and he will become disgusting in the eyes of others.
The Magen Avraham then quotes Shaar HaKavanot of the Arizal that one should not put on two items of clothes at the same time, as it can make one forget.
The Shaar HaKavanot doesn't mention anything about wearing clothes backwards with connection to forgetting. He gives a reason why putting on two garments simultaneously can cause one to forget.
The reason connects physical garments to the spiritual garments of a person, and explains how a person's garments are naturally holy, but by doing sins causes the holy garments to be under the control of the Klipot (forces of impurity). garments surround a person and each garment has a surrounding light (Ohr Makif) that is so high that it cannot be touched by the forces of impurity, thereby shielding the garment itself from the forces of impurity.
When one puts on two garments at once, he leaves no room for the surrounding light between the first and second garment. The garment is therefore vulnerable to Klipot, and Klipot cause forgetfulness, as we know that there is no forgetfulness in the forces of purity and holiness.
Interestingly, it appears from this that there is no problem with putting on two non-overlapping garments (such as both socks or shoes) at once.
The Shulchan Aruch Ha-Ari (S"K 6) explains the same thing in a more simple way.
The Talmud (Shabbat 114a) defines a Talmid Chacham as someone who is careful to wear his clothing right-side-in. The Shulchan Aruch rules this way in Choshen Mishpat 162:21 and explains the reason to be that a Talmid Chacham must be careful to look respectful and inside-out clothing shows its stiching and looks disgraceful. The Shulchan Aruch also recommends in Orach Chaim 2:3 that everyone be careful about this, lest people begin to think negatively about each other. The Taz (OC 2 sk 2) and Shulchan Aruch HaRav (OC 2:2) rule that if he already put it on inside-out he does not need to fix it, unless he is a Talmid Chacham where he is in danger of causing people to dislike the Torah. However, none of these sources mention forgetfulness.
Yalkut Yosef 2:3. (Interestingly, the Mishnah Brurah 2:2 doesn't list it in his list of things that make you forget. But as a side point, even the M"B holds that it's forbidden to do it, but I can't remember where he said it.)
The reason: R' Dr. Asher Meir writes in Meaning in Mitzvot p. 10 that this is because it is a shortcut (being too lazy to take it off and putting it back on right). Everything you do as a shortcut (i.e. out of laziness) leads to forgetfulness.