If you're flying international > international (non-US) via YYZ then you by-pass the main CBSA although they will do a cursory check (It's called Customs 'B').
If you're flying international > USA via YYZ you will have to pick up your baggage, go through the CBSA process (Customs 'A') then go through the US Homeland Security process in YYZ.
Because YYZ has pre-clearance there's no way around it. The bonus is, of course, when you arrive at your US destination there's no US Customs there, it's like a domestic flight arrival. If you've been trhough US customs in places like LAX then you'll know that's a great benefit in itself.