I would guess the OP was on what is currently AA718 SFO/PHL/FCO, a single flight number but a change of aircraft in PHL. AA appears to have changed the SFO/PHL flight number in the June schedule.
AA's rebooking engine isn't that intelligent, and chose the reroute instead via JFK.