Can a GFCI receptacle protect other receptacles?
If wired correctly, this is fine.

GFCI outlets typically have line terminals (power input) and load terminals (power to other outlets, which will be protected by the GFCI.)

Your contractor will have wired the outlet in the second bathroom to the load terminals of the GFCI in the main bathroom. There should also be a sticker on the outlet stating that it is GFCI protected, as it can be less obvious when the outlet stops working but no breakers are blown what's going on. However, these stickers don't last well, so they may not have bothered (or may have stuck it on the inside of the outlet plate so it would be found early in troubleshooting)

If you have concerns, you should purchase (not too expensively) an outlet tester that includes a GFCI test function, plug it in to verify correct wiring and then press the test button to verify that the GFCI trips as it should.