Since you will be arriving in the US from an international airport without US preclearance facilities, you will need to pick up your bags and take them through customs no matter what. Although they may be tagged all the way to YYJ, they will show up in SFO anyway, so you can not leave them there overnight.