YYC has pre-clearance, meaning returning to YYC would involve customs reprocessing everyone on the plane. It's possible it was a medical issue that was sever enough to call for a diversion, but not so sever it couldn't wait an extra 30 min or so.
I guess that same thing could be said about a warning light, but would like to think that a pilot would take the same precaution whether the distance was 30 min or 4 hours away.
Either way - my guess is it had something to do with pre-clearance and not wanting to deal with customs officials