Worst and most aggressive pat down I have ever experienced was in Toronto for no reason that I can think of, so I have learned to be stoic about all interactions with gate keepers, regardless of country. You never know when someone had a bad cup of tea just before the met you.
New York is the worst security I've ever come through for just being needlessly horrible. Like screaming at people because they didn't literally put their feet on the "footprints" on the floor.
Toronto was fine. Just a slightly incredulous conversation about how we could take 3 weeks off to travel Canada.
Especially if you've been in New York for a few days, being yelled at shouldn't be taken so personally. Especially when you consider how many people badly need instructions yelled at them because they're so very confused, I can see why they do it!
While there's U.S. Customs agents in Pearson, the entirety of security is done by CATSA. I cannot imagine U.S. Customs doing any sort of pat down. I'm not sure they'd even be allowed to do anything like that in Toronto. I think they're pretty much only allowed to screen and admit or reject.