The agent didn'tdid not realize that you were a Canadian resident and thought that you had made a brief trip to Canada. There's a VWP rule that brief trips to Canada, Mexico, or adjacent islands do not reset the 90 day limit given to a VWP traveler upon entry to the US. This is to prevent people from using these countries to extend their stay in the US.
For obvious reasons, that rule cannot apply to residents of one of those countries when they make "brief trips" to their country of residence. Those aren't brief trips; they are stays at home.
See https://travel.state.gov/content/visas/en/visit/visa-waiver-program.html.
Proving you're a Canadian resident without a permanent resident card and without evidence of citizenship might be tricky, though. A bank statement showing a Canadian address and Canadian-source of income might do it.