The A321 is the backbone of US's* domestic/regional fleet; that's the expected level of service and comfort out of PHL on flights within it's range (ie everything except Europe). Sometimes, particularly in the winter when they operate fewer flights to Europe, US uses their long haul plane (the A330) on beach routes like CUN. Consider it a nice bonus above the expected level of service.
It's true that there are no other nonstop options out of PHL, but DL via ATL, UA via IAH or IAD, B6 via FLL, WN via ATL, and LAA* via MIA or DFW are all options which may or may not be more comfortable (and I'm probably missing some -- if you want to go with less comfort, Spirit may well be able to get you there; AM can probably do it as well). But no airline puts their best product on CUN flights except when it makes sense from a fleet utilization point of view, which is why you got the A330 in one direction.
*For fleet purposes, AA and US remain mostly separate; you'll get LUS aircraft on the vast majority of flights out of PHL and other LUS hubs and LAA aircraft on the vast majority of flights out of DFW, MIA, and other LAA hubs.