bathroom switch and outlet
Codes are usually enforced only when work is newly done or significantly upgraded. You are almost never legally required to upgrade old work to modern code, though sometimes it's desirable for safety, convenience, or sellability.

Assuming you're not having trouble with the existing setup, and you have the proper GFCI and overcurrent protection, there is no reason to change. When you build your next bathroom, they'll dedicate a 20A circuit just to outlets, so you can your hair dryer and curling iron at the same time!