The saluting as a courtesy (curtsey if you wish) to wives of etc I believe is linked to a bygone era of societal good manners. Much in the same way as saluting a civilian hearse on passing or if passed by, it was just a manner of paying respect. It has not a great deal to do with rank just good manners. I agree it sometimes viewed as anachronistic but manners maketh.......
As for wives that wear the rank of their spouse