Why do electrons flow from a lower potential energy to a higher potential energy?
You're confusing (electrostatic) potential (aka voltage) with potential energy.

An electron has a high potential energy when it is at a location associated with a more negative value of potential, and a low potential energy when at a location associated with a more positive potential.

The reason is that electrical charge has two types: positive and negative which exert attractive forces on each other but repulsive forces on themselves. A more positive potential is produced by an accumulation of positive charge (which attracts negatively charged electrons) and a more negative potential is produced by an accumulation of negative charge (which repels electrons).

The choice of defining one type of charge as negative and the other as positive was made arbitrarily, before the electron (with negative charge) was identified as the primary current carrier in metallic conductors. By the time that was discovered it was too late to go back and re-define the charge polarities for the convenience of engineers. In any case, the "mixed-up" polarity definition should help you remember that electrons aren't the only charge carrier and when other carriers are present they might behave differently from electrons.