I am flying from Tokyo to Toronto through Chicago. Do I have to clear customs and claim my baggage in Chicago? I am flying with American Airlines. The flight is NRT - ORD - YYZ
Yes, everyone who arrives at a US airport on a flight from Japan (or any other place outside the US that does not have preclearance) has to pass through immigration, then pick up their checked baggage (if any) and carry through customs.
It doesn't matter that the next thing you plan to do after clearing customs is to take another flight out of the US.
There is one small relief: if you're traveling on a single itinerary, then the baggage tags on your checked luggage will usually be good for both flights, so you can hand the bags back to the airline at the transfer baggage drop right after customs, and don't need to stand in line to get new tags.