It's based on the mechs role.
Usually scouts have max energy of 16
Attackers have up to 32-24
Tanks 24
Support 24
So based on this, puma, being an attacker has more energy than stalker even though it's the same rank.
Puma has a max of 32 and stalker has a max of 24 so that's why.
Stalker is also an Attacker Mech