I want to feed power to two outlets from one outlet. Is there a problem with code doing that?
The problem is the bathroom, not the branching
The issue you have isn't the &quot;branch&quot; in the circuit (T-taps, if you will, are a normal part of building wiring), it's that you can't have bathroom receptacles on the same branch circuit as things that aren't in a bathroom, or non-receptacles that aren't in the same bathroom as all the bathroom receptacles served by the circuit:

(3) Bathroom Branch Circuits. In addition to the number of
branch circuits required by other parts of this section, at least
one 120-volt, 20-ampere branch circuit shall be provided to
supply the bathroom(s) receptacle outlet(s). Such circuits shall
have no other outlets.


Exception: Where the 20-ampere circuit supplies a single bathroom,
outlets for other equipment within the same bathroom shall be permitted
to be supplied in accordance with 210.23(A)(1) and (A)(2).

So, if you don't have a receptacle-only bathroom branch circuit you can tap, you'll have to pull a new homerun of 12/2 from the panel to meet Code.  Note also that you can't tap most kitchen receptacle circuits to feed lighting, either, as the kitchen small appliance branch circuits aren't allowed to serve non-kitchen-receptacle loads, period.