Your free baggage allowance.
For a ticket starting or ending within the US, your free baggage allowance will be consistent throughout the whole ticket. Find the flight with the maximum baggage allowance on your ticket; that allowance will be consistently applied throughout the whole ticket. (US law requires that the allowance of the first leg is applied throughout the whole ticket, but as far as I am aware every airline applies the maximum allowance. This is different from the usual IATA "most significant carrier" rule.)
This means that for your PHL-LAX-SYD-LAX-PHL itinerary, you will receive the baggage allowance from the LAX-SYD flight on every flight on the ticket.
Extra baggage fees.
Additional bag fees apply per baggage-journey. A baggage-journey is from check-in to pick-up from a baggage belt. When a pick-up to the next drop is less than twenty-four hours, it counts as the same baggage-journey. (i.e., connecting flights are one baggage-journey, even if you have to pick up your bags for logistical reasons.)
In your case you have two baggage-journeys, PHL-LAX-SYD and SYD-LAX-PHL. In both cases, the transpacific fees would apply.
If you took a stopover of greater than twenty-four hours in LAX in one direction, you would have three baggage-journeys, and if you exceeded your free allowance, you would have to pay three bag fees. However on your domestic flight, your free baggage allowance from the transpacific sector would continue to apply because it will be consistent throughout the whole ticket.