You can probably answer this: Why don’t they build refineries closer to the supply i.e. the need for the Keystone and other pipelines?
Because it is cheaper to continue to use the existing refineries connected to the existing refined products pipeline s and petrochemical complexes.
It is far cheaper to build one crude oil pipeline that pipelines that connect the many different products to the markets. In the Gulf Coast Region we also have other inputs to the refinery such as hydrogen pipelines, natural gas and power lines. Sulfur is produced from the refinery as it is separated out the crude. Many produce petroleum coke as well. Just not a lot of markets for these in North Dakota.
Placing the refinery at the Bakken or Fort Murray eliminates one transportation problem and creates a dozen others.