I picked up relatives from this flight. Temps in Chicago were no different an hour later (37.2C/99F) when this flight departed. Cathay was quite desperate to offload people from this flight. At check-in they were offering a $400USD voucher, an upgrade voucher, and a rebooking on to the United flight (which they highlighted as "leaving earlier"...although it too was delayed). The comment above regarding unwillingness to offload cargo is probably correct.
The TPE stop was for fuel. The flight circled one revolution while over the coast of Japan (you can actually see this on flightaware.com) which was clearly the moment of decision as to where this flight would go to next. The issue was complicated by Tropical Storm Doksuri in the area. I suspect that the TPE stop was out of safety in case of a lengthy hold upon arrival into HK airspace.