Well they're not giving it away for free, they're just selling it for the same price to Vancouver as they would to someone going all the way to Toronto...
Point of Origin/Destination fare differences including some flights that individually would be more expensive are covered in many deals/threads such as the ex-BOS one... many of us enjoy taking advantage of these fares to get extra flights for "free" as mileage runs, but to the airlines, they're just catering fares to different markets based on competition/wealth/load/etc.