You didn't explain why you were changing the element or if you tested it before doing so. Did you have a lack of hot water?
If the bathroom faucet you turned on was a single handle faucet, then they allow water to bleed over to the other side when in the middle position. These single lever valves found in showers, lavs, and kitchens are also notorious for allowing water to leak by from one side to the other whether they are on or not. One of the troubleshoots I would perform on a hot water heater not putting out hot water like it used to would be the elements and thermostats, if electric, a broken diptube, and isolating single handle faucets.