That's insanity! I don't care if customs officials couldn't meet the passengers at night. They should've cordoned off an area of the terminal and let them stay in the heated confines of the airport. The requirement that you must clear immigration/customs to be on Canadian soil is an urban legend. They do precisely this at YVR (HKG->JFK via YVR) and YYZ (INTL>INTL) all the time, why couldn't they make an exception for this rare incident! -30 is fine if you're a Northerner like myself but most people can't stand that type of temperature drop, certainly not the least of which for over a dozen hours. I'm sure the ETOPS plan of UA allows for just this incident to occur since they are supposed to stock at least an extra meal (or more) in such incidents.
-James