Dual versions of "folding" symmetric ADE Dynkin diagrams? Start with the Dynkin diagram of an irreducible root system, typically associated with a simple
Lie algebra over $\mathbb{C}$ or a simple algebraic group.    Most of the simply-laced ADE
diagrams admit natural symmetries of order 2:  type $A_r$ when $r \geq 2$, type
$D_r$ when $r \geq 4$, and type $E_6$.   In the case of type $D_4$, there is also a
symmetry of order 3.    There is an obvious way to "fold" each diagram by identifying those vertices which are
interchanged by the symmetry.    This yields Dynkin diagrams with two root lengths.   For
example, $E_6 \leadsto F_4$.
What I don't see is any general theory dictating in advance how to interpret this process.
In particular, does a pair of simple roots (vertices) interchanged by the symmetry in type $E_6$
lead to a long or a short simple root in type $F_4$?      In effect, there are (Langlands) dual
possibilities, switching long and short roots while also switching types $B_r$ and $C_r$.   It may be difficult to formulate a single theory of folding and duality which makes all instances
look natural, but it's at least reasonable to ask:

What is the origin of the notion of "folding" for Dynkin diagrams?

It's well-known that the ADE graphs are ubiquitous in various areas of mathematics; for an
older survey see the paper by Hazewinkel et al.
here.   The usual
convention is to regard all vertices of the graph as corresponding to long simple roots.
In their examples, the most common type of folding occurs this way:
$A_{2r-1} \leadsto C_r, \: D_{r+1} \leadsto B_r, \:  D_4 \leadsto G_2, \: E_6 \leadsto F_4$,
where multiple simple roots are always taken to short simple roots.    Examples occur in
various parts of Lie theory: classification of real forms of complex semisimple Lie algebras,
classification of $k$-forms of reductive $k$-isotropic algebraic groups (Satake, Tits), etc.
But in the study of simple singularities of types ADE (work of Grothendieck, Brieskorn, Slodowy),
adapted to other Lie types,  the natural folding procedure is dual to the above one:
$A_{2r-1} \leadsto B_r, \: D_{r+1} \leadsto C_r, \:  D_4 \leadsto G_2, \: E_6 \leadsto F_4$,
where now multiple simple roots lead to long simple roots.
My own motivation comes from related work on representations of Lie algebras of simple algebraic
groups in prime characteristic.   Here the most elusive non-restricted representations
belong to nilpotent elements (or orbits).   The case of regular nilpotents is easy, but
already the subregular case is too difficult for current algebraic methods to complete in
case of two root lengths.   (For large enough primes, the deep work of Bezrukavnikov,
Mirkovic, and Rumynin has pushed farther.)
It's instructive to think of (dual) folding in connection with Dynkin curves (Springer fibers
in the subregular case) and the detailed results of
J.C. Jantzen in Subregular nilpotent representations of Lie algebras in prime characteristic,
Represent. Theory 3 (1999), 153-222, freely available
here.     His incomplete
dimension calculations involving two root lengths would become transparent if the folding process could be rigorously justified in advance.
 A: Let me explain how both kinds of foldings of Dynkin diagrams (i.e., $A_{2n-1} \to B_n$ and $A_{2n-1} \to C_n$) arise in the context of Lie algebras and characters of their representations.
First of all, what I will call the "standard combinatorial procedure" for folding a root system $\Phi$ according to a Dynkin diagram automorphism $\sigma$, as described by Stembridge here, will produce the Type $B_n$ diagram from a Type $A_{2n-1}$ diagram (and will produce a Type $C_n$ diagram from a Type $D_{n+1}$ diagram). The standard procedure is to produce the root system whose simple roots $\beta_{I}$ correspond to orbits $I \subseteq \Delta$ of the simple roots of the original diagram under the automorphism $\sigma$: we just take the sum of the roots in each orbit $\beta_{I} := \sum_{\alpha\in I} \alpha$. Let me call this folded diagram root system $\Phi^{\sigma}$.
However, if $\mathfrak{g}$ is the Lie algebra of $\Phi$, then the automorphism $\sigma$ acts on $\mathfrak{g}$ in an obvious way, and the fixed-point Lie subalgebra $\mathfrak{g}^{\sigma}$ has as its root system the dual of $\Phi^{\sigma}$. In this way we get the inclusions $\mathfrak{sp}_{2n}\subseteq \mathfrak{sl}_{2n}$, and $\mathfrak{so}_{2n+1} \subseteq \mathfrak{so}_{2n+2}$ (i.e. $A_{2n-1} \to C_n$ and $D_{n+1} \to B_n$).
But there is way to make the "standard" folded root system $\Phi^{\sigma}$ appear in the context of Lie algebras as well, namely, by considering so-called "twining characters." Let me call the Lie algebra associated to $\Phi^{\sigma}$ the "orbit Lie algebra" of $(\Phi,\sigma)$.
The set-up in which the orbit Lie algebra arises is this: we can "twist" any representation $V$ of $\mathfrak{g}$ by the automorphism $\sigma$ to get a new, twisted representation $V^{\sigma}$; if $V=V^{\lambda}$ is the highest-weight representation with highest weight $\lambda$, then $V^{\sigma} = V^{\sigma(\lambda)}$, where $\sigma$ acts on the weight lattice of $\Phi$ in the obvious way. Suppose that we choose a $\sigma$-fixed weight $\lambda$. Then we can view $\sigma$ as a map $\sigma\colon V^{\lambda}\to V^{\lambda}$ (I think this is technically defined up to scalar). The twining character of $V^{\lambda}$ is defined to be $\mathrm{ch}^{\sigma}(V^{\lambda})(h) = \mathrm{tr}(\sigma\cdot e^{h})$ for $h \in \mathfrak{h}$, just like the usual character would be $\mathrm{ch}(V^{\lambda})(h) = \mathrm{tr}(e^{h})$. The twining character formula, which is originally due to Jantzen (see the discussion at the beginning of https://arxiv.org/abs/1404.4098) but has been rediscovered by many people (e.g., https://arxiv.org/abs/hep-th/9612060, https://arxiv.org/abs/q-alg/9605046), asserts that the twining character $\mathrm{ch}^{\sigma}(V^{\lambda})$ is equal to the usual character $\mathrm{ch}(U^{\lambda})$ where $U^{\lambda}$ is the highest-weight representation of the orbit Lie algebra with highest weight $\lambda$ (note that since $\lambda$ is fixed by $\sigma$, it is naturally a weight of the folded root system $\Phi^{\sigma}$). So the upshot is that a Type $A_{2n-1}$ twining character is a Type $B_{n}$ ordinary character.
The twining characters have some interesting applications to combinatorics when considering "symmetric" versions of combinatorial objects associated to Lie algebras, which is how I became aware of them. I quote from the 2nd column of the 4th page of this paper of Kuperberg (https://arxiv.org/abs/math/9411239):

As stated in the proof, $\sigma_B$ is a Dynkin diagram automorphism. The character theory of semi-direct products arising from Dynkin diagram automorphisms is described by Neil Chriss [2], who explained to the author that although this theory is known to several representation theorists, it may not have been previously published. The group $\mathbb{Z}/2 \ltimes_{\sigma_B} SL(2a)$ has two components. The character of a representation on the identity component is just the usual character of $SL(2a)$. The character on the $\sigma_B$ component, when non-zero, equals the character of an associated representation of the dual Lie group, in this case $SO(2a + 1)$, to the subgroup fixed by the outer automorphism, in this case $Sp(2a)$. The representation associated to $V_{SL(2a)}(c\lambda_a)$ is the projective representation $V_{SO(2a+1)}(c\lambda_a)$, where $\lambda_a$ is now the weight corresponding to the short root of $B_a$, the root system of $SO(2a + 1)$. In particular, the trace of $\sigma_B$ is the dimension of $V_{SO(2a+1)}(c\lambda_a)$, as given by the Weyl dimension formula, and the trace of $\sigma_BD_q$ is the q-dimension, as given by the Weyl q-dimension formula.

The disclaimer at the beginning of this quote suggests that (at least in 1994) this folding business was not well-known or written down precisely in a canonical text.
A: The dual folding of the Lie algebra has recently appeared in our work arXiv:2103.06044 on twisted 6d (2,0) superconformal quantum field theories on circle.  The 6d (2,0) theories of A, D, E type are not a  gauge theory nor have any Lagrangian description. These theories arise  in type IIB string on A,D,E singularities. The work contains a lot of calculation of the related elliptic genus, which  could play some role in the representation theory. Our work also contains the folding of $A_{2r}$ theories to $C'_r$.
