1996 NEC. 210-52 Dwelling Unit Receptacle Outlets (d) Bathrooms. In dwelling units, at least one wall receptacle outlet shall be installed in bathrooms adjacent to each basin location. Bathroom receptacle outlets shall be supplied by st least one 20-ampere branch circuit. Such circuits shall have no other outlets.
The fact that your house was built in 1997 doesn't mean they had adopted the latest code cycle. For areas that had adopted the 1996 NEC this would have been a code violation.
I wish I had some older code books to see when the change occurred. Maybe someone with a collection of older code books will look it up.