They might have a stun setting for unarmed people.
They might? I mean you also mention the two instances they ever use it, I don’t get what is ambiguous here.
Otherwise, from an in and out-ot-universe PoV, why would Imperial and FO Stormtroopers wear useless armor?
There is no in-universe explanation. They wear white armour, it looks nice and shiny. That’s it. Out of universe they call it movie magic, the heroes kill the bad guys who can only hit them back when it suit the plot.