I’m assuming you had the LAX-LHR-NAP as a transit in LHR and not a stopover? AA and BA both are not inclined to short check bags on a transit connection. On the inbound of ex-EU round trip people often want to do this so they can hop off in LHR and not use the final segment ( ending the trip in LHR would usually mean a more expensive ticket). With an xonex this rationale doesn’t really apply but I imagine the agent just saw the transit and was following policy of not short checking.
You can prevent this from occurring by booking LHR as a stopover instead of a transit — this will of course increase the taxes due on your ticket as you will then be responsible for UK APD.