Let me mention why I suggested that you do the research discretely and quietly. At this point, I infer that you do not know when the panel came to be within the bathroom, except that it happened before you bought the house. Therefore, you do not know whether the project that caused this to be, whether it was installation of the panel or remodeling to create a new bathroom, was performed covered by a building permit.
Suppose, just for the sake of discussion, that the previous owner did the project himself, without getting a permit. Suppose you start asking the court house about the date the project was installed, and they reply "what project?" Suppose they discover that work was done without a permit, and tell you that you have to tear it all out. There are jurisdictions that will do exactly that.
So I think you should not walk boldly into that nightmare. You can use other sources. Ask the real estate agent that handled your purchase of the house. Ask the neighbors. If possible, ask the former owners. You can get information about the dates that certain codes went into effect from your local public library.
If I were a gambling man, which I am not, but if I were, my money (a small amount, to be sure) would be on the notion that you are OK as is, that no inspector can walk into your house and tell you that you have a code violation, and that nothing has to be done.