CSDs/CSMs no longer have authority to upgrade staff in this way.
The only legitimate staff upgrades are processed by ground staff (for commercial reasons) or when staff have purchased "J-priority" tickets or are entitled to J/F cabin based on seniority.
Captains have the authority to upgrade - on what basis, I'm not sure.
IMO, blatant non-commercial upgrades of staff in the manner described by the OP are quite insensitive, apart from being against the rules.
Having said that, it happens anyway, and always will, regardless.