It happens a fair bit. YYZ - HKG was for the longest time more expensive than YYZ - HKG - BKK for example. Flying SEA - YVR - YYZ is often cheaper than YVR - YYZ.
The usual assumption is market forces, free competition etc. But sometimes ya gotta wonder ...