If we add energy to a system via heat or work, it doesn't matter, we increase its internal energy. That is the content of the first principle of thermodynamics. A point that may not be obvious is how such an increase in energy affects the average potential and kinetic energy separately.
Classical Thermodynamics may provide a firm guide to discussing such an issue, although it cannot shed light on the microscopic mechanism behind the phenomenon. Still, it is helpful to start from here. Thermodynamics says that, for a stable thermodynamic system, the temperature must be an increasing function of the energy. It is a property of thermodynamic systems directly connected to the positive definiteness of specific heat. Notice that the case of no increase in temperature when energy increases (at a first-order phase transition with latent heat) is included.
Therefore, the modified question should be: why does the kinetic energy of particles increase on heating but remains constant at a first-order phase transition?
Statistical Mechanics provides the answer.
Firstly, Statistical Mechanics allows for establishing a link between temperature and average kinetic energy of the system for classical systems (equipartition theorem). Moreover, it allows justifying the positiveness of specific heat, including the case of diverging specific heat at phase coexistence.
Of course, Statistical Mechanics does not describe the microscopic mechanisms, but it helps to understand the critical ingredients for the observed behavior. Indeed, it shows that such a behavior is shared by every system described by Hamiltonians (aka interactions), allowing the so-called thermodynamic limit. The case of gravitational interaction is instructive: they are systems where the usual thermodynamic limit does not exist and are characterized by a negative specific heat: their temperature increases when energy decreases. It is a trivial consequence of the viral theorem. Such a finding establishes that the usual behavior of laboratory thermodynamic systems is a property of the particular class of interactions corresponding to Hamiltonians amenable to the thermodynamic limit.
We can conclude that the non-decrease of the average kinetic energy is rooted in the way the number of microscopic states increases with the system's energy. Only such a property decides how the added energy is partitioned into kinetic and potential energy.