This is the working of a Canadian Internation al airport for arrival and departures:
Arrival:
- Domestic - head into terminal
- International, no differentiation between the US (transborder) and other countries - clear CBSA Canadian immigration. The exception is transiting to a US-bound flight with an issued boarding pass. However, you will be questioned why if you are arriving from the US and then departing to the US.
Departure (3 distinct areas)
- Domestic
- International
- US Transboarder with US CBP preclearance
In your case, you are international arrival and US departure. There is no place to wait for your departure flight without going through the formality.