This is just an exempt case. According to the convention, the place of the cations within ionic compounds is in front of anions, except in sodium acetate.
Since the hydrogen forms a covalent bond to oxygen in CH3COOH, the place of sodium in sodium acetate, CH3COONa, looks like Na forms a covalent bond to oxygen too, which is not the case.
We'll have to accept this exception as we accept potassium hydroxide written as KOH and not KHO, though the ion from this compound is called hydroxide.
Sodiun Acetate is an organometallic salt. It is the salt of Acetic acid.Acetic acid has the formula CH3COOH. The hydrogen to be replaced is the last one. Thus sodium is written at last.
The reaction can be written as:
H O H O
| || | ||
H-C-C-O-H + Na --------> H-C-C-O-Na + H2
(Acetic Acid) (Sodium) (Sodium Acetate)
Due to the appearence of sodium in the end of the compound chain i.e. in COO- side the formula is CH3COONa not NaCH3COO