The same reason military officers would wield swords when rifles and pistols were used, it’s a position of authority and respect. Plus it’s rather effective as an intimidation tactic. If I had a huge blaster rifle and someone walked up to me confidently with a sword, I'd be unnerved.